docker-copy

Docker-Compose not able to copy haproxy.cfg

假装没事ソ 提交于 2020-01-11 09:50:14
问题 My problem is that I have a docker-compose.yml file and an haproxy.cfg file and I want docker-compose to copy the haproxy.cfg file to the docker container. As per the post Docker composer copy files I can use volumes to do it but in my case I'm getting the below error. Can anybody help me achieve this. Below is the code and everything docker-compose.yml version: "3.3" services: ###After all services are up, we are initializing the gateway gateway: container_name: gateway-haproxy image:

How to reference embedded Docker resource files using file path URL

流过昼夜 提交于 2019-12-11 21:56:14
问题 I have created a Docker image and embedded some static resource files within it, using the following command in the Dockerfile: COPY resources /resources I have a java web application running within the Docker container which requires access to these static files. File paths must be provided using a URL, E.g.: file://c:/resources/myresourcefile.css I am able to construct the URL programmatically but am unsure if embedded files can be referenced this way. Any guidance would be appreciated!

COPY with docker but with exclusion

女生的网名这么多〃 提交于 2019-12-03 02:29:08
问题 In a Dockerfile, I have COPY . . I want to exclude an entire directory, in my case, node_modules directory. Something like this: COPY [all but **/node_modules/**] . Is this possible with Docker? 回答1: Create file .dockerignore in your docker build context directory (so in this case, most likely a directory that is a parent to node_modules) with one line in it: **/node_modules although you probably just want: node_modules Info about dockerignore: https://docs.docker.com/engine/reference/builder

COPY with docker but with exclusion

谁都会走 提交于 2019-12-02 16:26:46
In a Dockerfile, I have COPY . . I want to exclude an entire directory, in my case, node_modules directory. Something like this: COPY [all but **/node_modules/**] . Is this possible with Docker? vith Create file .dockerignore in your docker build context directory (so in this case, most likely a directory that is a parent to node_modules) with one line in it: **/node_modules although you probably just want: node_modules Info about dockerignore: https://docs.docker.com/engine/reference/builder/#dockerignore-file For those who can't use a .dockerignore file (e.g. if you need the file in one COPY