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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

build and packaging updates #13

Merged
merged 1 commit into from
Apr 10, 2019
Merged

build and packaging updates #13

merged 1 commit into from
Apr 10, 2019

Conversation

anitgandhi
Copy link
Contributor

Changes

  1. Update Dockerfile.dapper to install Go 1.12, separate go gets for better image layer caching
  2. replace ubuntu image with simple alpine base image
  3. add linker flag -w for smaller binary
  4. gitignore some generated files

I've tested this in a Vagrant box and it seems to work fine. Since the binary was built with CGO_ENABLED=0 already there was no need for anything else at runtime. I initially tested with FROM scratch but that failed since /tmp didn't exist (for logs), so I switched to just plain alpine:latest.

The Docker image goes down from ~320MB (v0.0.5) to ~30MB 馃槃

@yasker
Copy link
Member

yasker commented Apr 9, 2019

@anitgandhi It looks good! Can you merge two commits into one? Since the change to Alpine was originated from the first commit.

1. Update Dockerfile.dapper to install Go 1.12, separate go gets for better image layer caching

2. replace ubuntu image with simple alpine base image

3. add linker flag -w for smaller binary

4. gitignore some generated files
@anitgandhi
Copy link
Contributor Author

@yasker done!

@yasker yasker merged commit 6af86e3 into rancher:master Apr 10, 2019
@yasker
Copy link
Member

yasker commented Apr 10, 2019

Merged, thanks!

@anitgandhi Since it's not a blocker issue, I will release the new version later. Is that OK?

@anitgandhi
Copy link
Contributor Author

@yasker yup no problem!

@anitgandhi anitgandhi mentioned this pull request Apr 16, 2019
@anitgandhi
Copy link
Contributor Author

anitgandhi commented Apr 17, 2019

@yasker actually, do you think it would be possible to make a v0.0.6 with these changes? I know there's no functional changes, but it would make things a bit easier for us if we can include these changes :) If not, that's totally fine, I can build and ship it separately

@yasker
Copy link
Member

yasker commented Apr 18, 2019

@anitgandhi No problem. v0.0.6 has been cut. Let me know if it works for you.

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.

None yet

2 participants