My dockerfile:
FROM node:4
COPY . /srv/deploy_service
WORKDIR /srv/deploy_service
RUN npm install && \
apt-get update && \
apt-get install -y python python-dev python-distribute python-pip && \
apt-get install curl -y && \
curl -sSL https://get.docker.com/ | sh && \
pip install docker-compose
EXPOSE 3000
CMD bash -c "node deploy_service.js"
I execute docker-compose up and docker compose exec
service deployment:
version: "2"
services:
nginx:
image: jwilder/nginx-proxy
restart: always
container_name: nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/vhost.d:/etc/nginx/vhost.d:ro
deployment-service:
build: .
restart: always
container_name: deployment_service
volumes:
- /var/run/docker.sock:/var/run/docker.sock
expose:
- "3000"
depends_on:
- nginx
clix-core-production:
image: ${REGISTRY_URL}/${REGISTRY_USER}/clix-core:production
environment:
- NODE_ENV=production
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASS=${MYSQL_PASSWORD}
- MONGO_USER=${MONGO_USER}
- MONGO_PASS=${MONGO_PASSWORD}
expose:
- "8001"
links:
- mysql:mysql
- mongo:mongo
- redis:redis
depends_on:
- nginx
I get the following error:
ERROR: for nginx Cannot start service nginx: oci runtime error: rootfs_linux.go:53: mounting "/var/lib/docker/devicemapper/mnt/d73fe939a2d6071087d11b49e444ac7a453a7ea50447f1d888715c5b9a536b44/rootfs/etc/nginx/nginx.conf" to rootfs "/var/lib/docker/devicemapper/mnt/d73fe939a2d6071087d11b49e444ac7a453a7ea50447f1d888715c5b9a536b44/rootfs" caused "not a directory"
ERROR: Encountered errors while bringing up the project.