Single Dockerfile for both Faucet and Gauge
See original GitHub issueCurrently we use different Dockerfiles for Faucet and Gauge with 2 specific differences - EXPOSE
ports and CMD
.
In this proposal, I suggest we use a start script for CMD
- say faucet
. This script can be something like:
#!/bin/bash
case $1 in
"faucet") python3 faucet --ofp-tcp-listen-port=6653 ...
;;
"gauge") python3 gauge --ofp-tcp-listen-port=6654 ...
;;
*) echo "$0 [faucet|gauge|check-faucet-config]"
esac
If faucet
container is started with --volumes
, then, for gauge
we can use --volumes-from=faucet
so that same directories can be loaded.
With the above method, we are building only one image as compared to 2. On the disk, we store only one image.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Docker — Python documentation
We use Docker tags to differentiate between versions of Faucet. The latest tag will always point to the latest stable release of Faucet....
Read more >Multi-stage builds - Docker Documentation
With multi-stage builds, you use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them...
Read more >faucet/Dockerfile.gauge at master · faucetsdn/faucet - GitHub
FAUCET is an OpenFlow controller for multi table OpenFlow 1.3 switches, that implements layer 2 switching, VLANs, ACLs, and layer 3 IPv4 and...
Read more >Use the same Dockerfile for both local development and ...
With multi stage dockerfile our setup will now only have a single Dockferfile for both production build and local development.
Read more >Docker configuration - AWS Elastic Beanstalk
Instead, use the Dockerrun.aws.json file or the Dockerfile or both. ... You can run multi-stage builds from a single Dockerfile to produce smaller-sized ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We should move to docker buildx for our docker image builds which will allow us to build images in multiple archs which will let us remove the various docker-compose-pi.yaml files we have in our repo.
Sounds like a good plan.