Skip to content

fix: individual package cross dockerfiles #489

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

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions bolt-boost/Cross.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This image is meant to enable cross-architecture builds.
# It assumes the binary has already been compiled for `$TARGETPLATFORM` and is
# locatable in `./dist/bin/$TARGETARCH/$BINARY`.

# We need ubuntu 20.04 because more recent versions come with openssl3
# and our binary depends on openssl 1.1.1 and installing 1.1.1 on new
# ubuntu versions is highly discouraged.
FROM --platform=$TARGETPLATFORM ubuntu:20.04

LABEL org.opencontainers.image.source=https://github.com/chainbound/bolt
LABEL org.opencontainers.image.licenses="MIT"

# Filled by docker buildx
ARG TARGETARCH

# Should be set by the caller when building the image
ARG BINARY

# We need to install ca-certificates to make HTTPS requests (only with ubuntu 20.04)
RUN apt-get update && apt-get install -y ca-certificates

COPY ./dist/bin/$TARGETARCH/$BINARY /usr/local/bin/bolt-boost

ENTRYPOINT ["/usr/local/bin/bolt-boost"]
4 changes: 2 additions & 2 deletions scripts/cross.Dockerfile → bolt-sidecar/Cross.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ ARG TARGETARCH
# Should be set by the caller when building the image
ARG BINARY

COPY ./dist/bin/$TARGETARCH/$BINARY /usr/local/bin/bolt
COPY ./dist/bin/$TARGETARCH/$BINARY /usr/local/bin/bolt-sidecar

ENTRYPOINT ["/usr/local/bin/bolt"]
ENTRYPOINT ["/usr/local/bin/bolt-sidecar"]
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ build-and-push-image package tag:

docker buildx build \
--build-arg BINARY={{package}} \
--file ./scripts/cross.Dockerfile \
--file ./{{package}}/Cross.Dockerfile \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/chainbound/{{package}}:{{tag}} \
--push .
Expand Down