April 2017
Beginner
404 pages
9h 30m
English
Using docker-compose you can also build an image using the file options. For example, in the following docker-compose file we are building a custom web server and setting up the environment at once. In the following docker-compose we are providing the build context using the build key and the image name with tag using the image key.
version: '3' services: db: image: microsoft/mssql-server-windows-express ports: - "1433:1433" volumes: - c:\data cache: image: learningwsc/redis-server ports: - "6379:6379" web: build: . image: webserver:latest ports: - "80:80" environment: - db_connection = db - cache_connection = cache networks: default: driver: nat ipam: driver: default config: - subnet: 172.20.81.0/24
If you are building multiple ...
Read now
Unlock full access