I'm trying to do docker-compose build but the nginx return this error :
rm: cannot remove '/etc/nginx/conf.d/default.conf': No such file or directory
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c rm /etc/nginx/conf.d/default.conf' returned a non-zero code: 1
Here's the docker-compose.yml and the Dockerfile as well:
version: '3'
volumes:
pgdata:
services:
python:
build:
context: .
dockerfile: docker/python/Dockerfile
environment:
- DJANGO_SETTINGS_MODULE=sphinx_django.settings.prod
ports:
- 8000:8000
depends_on:
- db
command: gunicorn -w 4 sphinx_django.wsgi:application -b 0.0.0.0:8000
db:
image: postgres:10.3
restart: always
environment:
POSTGRES_USER: '121211'
POSTGRES_HOST: db
POSTGRES_PASS: '55555'
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
restart: always
ports:
- 8080:80
depends_on:
- python
And the Dockerfile:
FROM nginx:latest
RUN rm /etc/nginx/conf.d/default.conf
COPY ./docker/nginx/nginx.conf /etc/nginx/conf.d/
docker/nginx/Dockerfilesame one you posted above