Docker error ERROR for nginx Cannot start service nginx oci runtime error

0 votes

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.
Sep 24, 2019 in Docker by Hannah
• 18,520 points
6,609 views

1 answer to this question.

0 votes

I had faced a similar issue and I found something like this on Github:

FROM alpine

COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker
COPY --from=docker/compose:latest /usr/local/bin/docker-compose /usr/bin/docker-compose

it works

answered Sep 24, 2019 by anonymous
• 52,350 points

Related Questions In Docker

0 votes
1 answer

Error: Docker for windows failing to start

I got the same error, just follow ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,700 points
793 views
+2 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Docker error cannot delete docker container, conflict: unable to remove repository reference

First, remove the container names $ sudo docker ...READ MORE

answered Jul 31, 2018 in Docker by Kalgi
• 52,350 points
5,863 views
+2 votes
1 answer

Cannot connect to docker swarm service task

The id that command docker service ps <service> gives ...READ MORE

answered Sep 26, 2018 in Docker by Kalgi
• 52,350 points
1,632 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP