Skip to content

Conversation

@kolharsam
Copy link

This is related to the task which will eventually help us move staging away from render and into GCP

@kolharsam kolharsam requested review from Copilot and kitallis April 9, 2025 04:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

remove section that uploads new images from pull_request

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Sameer Kolhar <[email protected]>
@kolharsam kolharsam requested a review from Copilot April 9, 2025 04:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment on lines 23 to 24
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to set up qemu? Docker works natively on linux no?

Copy link
Author

Choose a reason for hiding this comment

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

Another good question! I added QEMU to support multi-arch builds (linux/amd64 and linux/arm64) for broader compatibility, thinking that we'd require the images to be used on Apple Silicon machines as well. That was a misunderstanding and I now understand that M1/M2 leveraging hardware doesn't need special images and can do just fine with the normal linux/amd64 images. I understand that, if needed, M1 devs can build natively. So yeah, we can certainly simplify and remove QEMU

Dockerfile Outdated
Comment on lines 8 to 43
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
curl \
libjemalloc2 \
gnupg2 \
less \
git \
libnss3-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

FROM --platform=${BUILDPLATFORM:-linux/amd64} base AS builder

RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential \
pkg-config \
libvips-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY Gemfile Gemfile.lock .ruby-version ./

RUN gem install bundler -v 2.4.2 && \
bundle config set --local without 'development test' && \
bundle install --jobs=4 --retry=3

COPY . .

FROM --platform=${TARGETPLATFORM:-linux/amd64} base

RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
libvips42 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Copy link
Member

Choose a reason for hiding this comment

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

Why run these apt-get installs and cleanups in 3 different sections?

Why not just install everything together in one place?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for flagging this! I've now consolidated all system package installs into a single apt-get install block in a shared runtime base (runtime). This removes the visual repetition across stages while still using a multi-stage build to keep build-time deps isolated. Let me know if you'd prefer going back to a more aggressively stripped runtime image, happy to do that too!

@kolharsam kolharsam requested review from Copilot and kitallis April 15, 2025 02:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • Dockerfile: Language not supported

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