Skip to content
Open
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
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22.18.0-alpine AS build
FROM node:22.22.1-alpine AS build

# Create link to node on amd64 so that corepack can find it
RUN if [ "$(uname -m)" == "aarch64" ]; then mkdir -p /usr/local/sbin/ && ln -s /usr/local/bin/node /usr/local/sbin/node; fi
Expand All @@ -7,17 +7,19 @@ WORKDIR /app

COPY . /app/

RUN apk --update add --virtual native-dep \
make gcc g++ python3 libgcc libstdc++ git && \
# Ensure corepack is enabled (available in official Node images) and
# install only build-time dependencies using a named virtual package.
RUN corepack enable && \
Copy link
Copy Markdown
Contributor

@Murderlon Murderlon Mar 13, 2026

Choose a reason for hiding this comment

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

Just remember that next time you upgrade to a new major version of Node, this line will crash because corepack isn't shipped by default anymore

apk add --no-cache --virtual .build-deps build-base python3 libgcc libstdc++ git && \
(cd /app && corepack yarn workspaces focus @uppy/companion) && \
apk del native-dep
apk del .build-deps

RUN cd /app && corepack yarn workspace @uppy/companion build

# Now remove all non-prod dependencies for a leaner image
RUN cd /app && corepack yarn workspaces focus @uppy/companion --production

FROM node:22.18.0-alpine
FROM node:22.22.1-alpine

WORKDIR /app

Expand Down
Loading