Overwrite existing Docker image
Overwrite existing Docker image
This section is all about customizing the Devilbox and its Docker images specifically to your needs.
Prerequisites
The new Docker image overwrite will be added to a file called
docker-compose.override.yml. So before going any further, read the
following section that shows you how to create this file for the
Devilbox as well as what pitfalls to watch out for.
docker-compose-override-yml
What information do you need?
- The service to overwrite
How to overwrite a service?
Generic steps
- Copy the whole service definition from docker-compose.yml to docker-compose.override.yml
- Remove anything unecessary
- Adjust the values you need
Overwrite Docker image for the bind service
The following example is using the bind service and overrides the
Docker image to illustrate how this is done :
First you simply copy the while definition of the bind service from
docker-compose.yml to docker-compose.override.yml:
version: '2.1'services: bind: image: cytopia/bind:0.11 restart: always ports: # [local-machine:]local-port:docker-port - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53" - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"
environment: ## ## Debug? ## - DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT} - DOCKER_LOGS=1
## ## Bind settings ## - WILDCARD_ADDRESS=172.16.238.11 - DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
dns: - 127.0.0.1
networks: app_net: ipv4_address: 172.16.238.100The second step is to remove everything that you do not need to overwrite:
version: '2.1'services: bind: image: cytopia/bind:0.11The last step is to actually adjust the value you want to change for the bind service:
version: '2.1'services: bind: image: someother/bind:latestFurther reading
* docker-compose-override-yml * add-your-own-docker-image