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 build process and collapse on one file. #860

Merged
merged 5 commits into from
Oct 7, 2020

Conversation

andrewsomething
Copy link
Member

This PR aims to simplify Docker build process by collapsing it on one file. To do so, I first needed to allow overriding GOARCH in the Makefile.

A few things to note:

A few things to verify:

docker build . -t doctl # Build Docker with defaults
docker build --build-arg GOARCH=386 . -t doctl # Build Docker overriding arch

make docker_build # Builds Docker w/ defaults, copies binary to builds/
make docker_build GOARCH=arm64 # Builds Docker overriding arch, `file builds/doctl` shows aarch64 binary

make build # Build binary with defaults
make native # Still works but prints deprecation warning
make build GOARCH=arm64 # Build binary overriding arch

Copy link
Member

@bentranter bentranter left a comment

Choose a reason for hiding this comment

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

👍 LGTM

Copy link
Contributor

@scotchneat scotchneat left a comment

Choose a reason for hiding this comment

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

👍

@andrewsomething andrewsomething merged commit 9c5be03 into master Oct 7, 2020
@andrewsomething andrewsomething deleted the docker-rework branch October 7, 2020 18:41
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

3 participants