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

Support cross-building #80

Merged
merged 3 commits into from
May 7, 2024
Merged

Support cross-building #80

merged 3 commits into from
May 7, 2024

Conversation

axw
Copy link
Member

@axw axw commented Mar 28, 2024

  • Specify --platform in the golang build stage
  • Set GOOS and GOARCH env vars
  • Remove apt-get upgrades; changed base image to chainguard/static

I don't think we need buildx?

@axw axw requested a review from a team as a code owner March 28, 2024 03:53
@axw axw marked this pull request as draft March 28, 2024 03:57
- Specify --platform in the golang build stage
- Set GOOS and GOARCH env vars
- Set CGO_ENABLED=0 to build static binaries
- Remove apt-get upgrades; changed base image to chainguard/static

I don't think we need buildx?
@axw axw marked this pull request as ready for review March 28, 2024 04:05
Copy link
Contributor

@lahsivjar lahsivjar left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines -40 to -58
# Add minimal stuff
RUN \
apt-get update > /dev/null \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
"apt-utils=*" \
"ca-certificates=*" \
"curl=*" \
"gnupg=*" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Copy link
Contributor

@inge4pres inge4pres Apr 3, 2024

Choose a reason for hiding this comment

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

Removing this will break any setup that relies on curl to generate the API key when apmsoak/apmbench are started via bash scripts.

Copy link
Member Author

Choose a reason for hiding this comment

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

ugh :)

Thanks for catching that, didn't realise/forgot we were doing this.

Copy link
Contributor

@inge4pres inge4pres left a comment

Choose a reason for hiding this comment

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

Sorry to block,it would break the load testing setup, see comment

@axw
Copy link
Member Author

axw commented Apr 26, 2024

@inge4pres thanks for catching that, should be resolved with https://github.com/elastic/apm-managed-service/pull/760. PTAL.

@axw axw requested a review from inge4pres April 26, 2024 00:05
Copy link
Contributor

@inge4pres inge4pres left a comment

Choose a reason for hiding this comment

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

Thanks, tested it out with all other recent changes and it works ™️
Nice addition 👍🏼

@axw axw merged commit 3ec8c6e into elastic:main May 7, 2024
3 checks passed
@axw axw deleted the docker-buildplatform branch May 7, 2024 08:24
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.

3 participants