I am using docker-compose, where I pull the image from the hub, BUT I need to modify it…
- User
I am using docker-compose, where I pull the image from the hub, BUT I need to modify it using my Dockerfile (inside there is only copy command for config file), the docker-compose.yml looks like below, can you help me fix it? version: '3'
services: nginx: build: context: . args: - NODE_ENV=local dockerfile: Dockerfile image: docker.io/nginx:latest ports: - "8080:80" - "8443:443" volumes: - /var/www/html:/usr/share/nginx/html:ro - /var/www/ssl:/etc/nginx/certs:ro restart: always
- Assistant
Given the scenario you've described, you want to use a Dockerfile to modify an existing Docker image; in this case, it's an Nginx image from Docker Hub. To accomplish this while retaining the structure of your , there are a couple of steps and changes you need to make.