Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- build.context = folder in which dockerfile is
- build.dockerfile = name of dockerfile
- When doing COPY command in the Dockerfile then only the files specified by the build.context is available
- For example:
- You have folder `postgresql` with dockerfile and scripts in.
- Then if you have a COPY command in the dockerfile and you want to copy a script such as `initdb.sql`
- Like:
- COPY initdb.sql /var/lib/postgresql/data
- Then your docker-compose.yml need the following config
- version: '3'
- services:
- database:
- build:
- context: ./postgresql
- dockerfile: postgresql.Dockerfile
Add Comment
Please, Sign In to add comment