question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Single Dockerfile for both Faucet and Gauge

See original GitHub issue

Currently 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:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
gizmoguycommented, Apr 21, 2020

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.

0reactions
shivarammysorecommented, Sep 12, 2019

Sounds like a good plan.

On Sep 11, 2019, at 6:36 PM, Brad Cowie notifications@github.com wrote:

Okay I understand now with that example from OVS.

I think I’m still against this option as it would require us changing documentation and would break the commands people already run to start faucet and gauge.

I will leave this ticket open to track implementing my solution (use same base image for faucet/gauge dockers), I can’t currently implement it as our docker build CI isn’t smart enough to support dependency ordering, but the new one we’ll be switching to (#3230) will let us do this easily.

Thanks for the suggestion!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found