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

Lets go back to building binaries outside of Docker #368

Closed
mmlb opened this issue Nov 16, 2020 · 5 comments · Fixed by #419
Closed

Lets go back to building binaries outside of Docker #368

mmlb opened this issue Nov 16, 2020 · 5 comments · Fixed by #419
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/M estimate of the amount of work to address the issue

Comments

@mmlb
Copy link
Contributor

mmlb commented Nov 16, 2020

As stated in #367 I like to build and run the services using docker-compose on my dev machine. Doing any small change to any of the services causes a rebuild of the binary in docker. This is generally slower than just building and COPYing during build but its made worse because the dependencies need to be downloaded each and every time.

Context

My edit-build-test cycle takes longer than necessary, so does CI.

I know this was added to support multi-arch images, but I think we can do better.

We can wire up a run target in the Makefile that has the dependencies properly set so that the binaries are built. This will take care of trying to run the docker-compose but no builds are done yet.

For the multi-arch images we can make use of sed to replace "vanilla" binary names with $GOOS & $GOARCH binaries. This would happen in ci or in make so not a big deal imo.

@gianarb
Copy link
Contributor

gianarb commented Nov 17, 2020

Great idea! Just one thing the sandbox will copy binaries from the containers across projects and architectures to release them as artifacts side to a GitHub release. So just remember to keep the binaries where they are in `/usr/bin. The end image has to be multi-arch manifest. In this way the automation won't break or require changes 👍

@thebsdbox thebsdbox assigned thebsdbox and gianarb and unassigned thebsdbox Dec 10, 2020
@thebsdbox thebsdbox added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Dec 10, 2020
@thebsdbox
Copy link
Contributor

I think this can be closed now @gianarb ?

@thebsdbox thebsdbox added kind/feature Categorizes issue or PR as related to a new feature. size/M estimate of the amount of work to address the issue labels Dec 10, 2020
@mmlb
Copy link
Contributor Author

mmlb commented Jan 21, 2021

@thebsdbox nope I don't think so, the binaries for the containers are still only built in the Dockerfile. I'll likely take inspiration from tinkerbell/smee#122 to do this.

@mmlb
Copy link
Contributor Author

mmlb commented Jan 21, 2021

Also, I'm starting on this now :D.

@gianarb gianarb assigned mmlb and unassigned gianarb Jan 21, 2021
@gianarb
Copy link
Contributor

gianarb commented Jan 21, 2021

Yayyyy thanks @mmlb

@mmlb mmlb closed this as completed in #419 Jan 22, 2021
mmlb added a commit that referenced this issue Jan 22, 2021
## Description

Builds the binaries used in the docker images outside of docker.

## Why is this needed

Fixes: #368 

## How Has This Been Tested?

Checked the built binaries with `file`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/M estimate of the amount of work to address the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants