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

chore: install deps and create foundry user in cross built image #9775

Merged
merged 1 commit into from
Jan 28, 2025
Merged
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
6 changes: 5 additions & 1 deletion Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# This image is meant to enable cross-architecture builds.
# It assumes the foundry binaries have already been compiled for `$TARGETPLATFORM` and are
# locatable in `./dist/bin/$TARGETARCH`
FROM ubuntu:22.04
FROM alpine:3.20

# Filled by docker buildx
ARG TARGETARCH

RUN apk add --no-cache git

COPY ./dist/bin/$TARGETARCH/* /usr/local/bin/

RUN adduser -Du 1000 foundry
Copy link
Member

Choose a reason for hiding this comment

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

I remember having to do something like this a while ago on something else

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, for this case is for being able to map host user to container user so there's no issue with volumes mapped permissions (resulting in git failure fatal: detected dubious ownership in repository)


ENTRYPOINT ["/bin/sh", "-c"]

LABEL org.label-schema.build-date=$BUILD_DATE \
Expand Down