Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Docker Image Build Process #1384

Open
christophermaier opened this issue Mar 30, 2017 · 0 comments
Open

Simplify Docker Image Build Process #1384

christophermaier opened this issue Mar 30, 2017 · 0 comments
Labels

Comments

@christophermaier
Copy link
Collaborator

The current Docker image build process for both Cog and Relay require more than just a docker build command. This means (among other things) that automated builds are made more complicated; it's not clear how to run them in Travis in the presence of a matrixed build (for the case of Cog, at least), and they're not buildable in Docker Hub.

In a post-Operable world, it probably makes sense to revisit our build process such that we can do a simple docker build for these projects. This will make it easier for community members (new and old alike) to build images on their own (and from their own code changes), and it makes it easier to automate. More automation is better!

Additional background can be seen in the comments on #1383, particularly the bit about removing cogctl from the cog image. Note however that such a change will have effects on the content of the Cog Book, so we'll need to make sure to update that accordingly.

christophermaier added a commit to operable/go-relay that referenced this issue Apr 17, 2017
Previously, we'd build a glibc Relay locally and then stuff that into a
minimal Docker image and provide that. Now, we do the build of Relay
inside the image build itself. I have confirmed that an executable built
in this Alpine image runs fine in a Debian (i.e., glibc) system.

However, this results in a larger image size right now. Compare the
previous sizes to what is currently built by this commit:

| Image    | Compressed | Uncompressed |
| -------- | ---------- | ------------ |
| Previous | 6 MB       | 19.9 MB      |
| Current  | 31 MB      | 82.4 MB      |

This allows us to easily automate the build with DockerHub, though,
because it doesn't require anything besides the Dockerfile.

See operable/cog#1384 for more.
christophermaier added a commit to operable/go-relay that referenced this issue Apr 17, 2017
Previously, we'd build a glibc Relay locally and then stuff that into a
minimal Docker image and provide that. Now, we do the build of Relay
inside the image build itself. I have confirmed that an executable built
in this Alpine image runs fine in a Debian (i.e., glibc) system.

However, this results in a larger image size right now. Compare the
previous sizes to what is currently built by this commit:

| Image    | Compressed | Uncompressed |
| -------- | ---------- | ------------ |
| Previous | 6 MB       | 19.9 MB      |
| Current  | 31 MB      | 82.4 MB      |

This allows us to easily automate the build with DockerHub, though,
because it doesn't require anything besides the Dockerfile.

See operable/cog#1384 for more.
christophermaier added a commit to operable/go-relay that referenced this issue Apr 18, 2017
Previously, we'd build a glibc Relay locally and then stuff that into a
minimal Docker image and provide that. Now, we do the build of Relay
inside the image build itself. I have confirmed that an executable built
in this Alpine image runs fine in a Debian (i.e., glibc) system.

However, this results in a larger image size right now. Compare the
previous sizes to what is currently built by this commit:

| Image    | Compressed | Uncompressed |
| -------- | ---------- | ------------ |
| Previous | 6 MB       | 19.9 MB      |
| Current  | 30 MB      | 81.6 MB      |

This allows us to easily automate the build with DockerHub, though,
because it doesn't require anything besides the Dockerfile.

See operable/cog#1384 for more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant