我想制作包含NodeJS和MongoDB的新Docker镜像。我有一张nodeJS(最新)图片。Dockerfile是
FROM node
RUN apt-get update
RUN apt-get install -y mongodb
EXPOSE 8800
EXPORT 27017
如果我构建它,它不能在两个端口上工作(mongodb:27017,nodeJS:8800)。是否需要在ubuntu Image上制作Dockerfile,而不是node Image?
FROM ubuntu:latest
我已经删除了所有的图片/容器
ubuntu@ubuntu:/var/lib/docker$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu@ubuntu:/var/lib/docker$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
我目前正在使用Docker开发一个CRA应用程序。一切都在开发中。但是,当我想要创建产品构建(我对生产构建使用了一个单独的docker-compose.yml文件)时,它总是告诉我它找不到这些文件。
我一直在获取Cannot find module: 'lorem.scss'. Make sure this package is installed.,在构建环境中,它紧跟在yarn run build之后。
我的Dockerfile:
##############################
# Base Image
############################
我是Docker的新手,正在尝试将Docker镜像推送到hub..giving me上,但出现了以下错误。
docker container run hellowold
This is v2
docker image tag hellowold:2 prateekaxyz/hellowold:latest
docker login http://hub.docker.com --username=prateek512
Password:
Login Succeeded
docker push prateekaxyz/hellowold:latest
The push refers to