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

fix building docker image #82

Merged
merged 1 commit into from
Jul 29, 2021
Merged

fix building docker image #82

merged 1 commit into from
Jul 29, 2021

Conversation

willnorris
Copy link
Collaborator

Use go modules instead of dep. Use two stage build to build a minimal (4 MB) application image.

Fixes #51 #71 #78

Use go modules instead of dep.  Use two stage build to build a minimal
(4 MB) application image.

Fixes google#51 google#71 google#78
@willnorris
Copy link
Collaborator Author

cc @mco-gh for review

@@ -1,10 +1,20 @@
FROM golang:1-alpine AS build-env
FROM golang:1.16 AS build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why hardcoded vs. alpine or latest? not critizicing, just curious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I typically lock in versions where I can. That gives me a chance to test things locally before committing to an upgrade. In this case, go only updates twice a year, so it's not much work to occasionally bump the build version. But of course, it is also probably unnecessarily conservative given the go1 compatibility promise. I don't have strong feelings on it, and am happy to go either way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fine with me as is, I just wanted to understand the thinking, thanks!

@mco-gh mco-gh mentioned this pull request Jul 29, 2021
@mco-gh mco-gh self-requested a review July 29, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker container
2 participants