Skip to content

Commit

Permalink
Promote node:alpine to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergeek77 authored Oct 6, 2023
1 parent b476524 commit e164ee4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile-frontend
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ RUN cd /app && \
# Original Dockerfile below (mostly)
FROM node:alpine as builder

# Lemmy uses a bleeding edge version of vips, and the necessary version is only available in Alpine edge
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories && \
echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories

# Added vips-dev and pkgconfig so that local vips is used instead of prebuilt
# Done for two reasons:
# - libvips binaries are not available for ARM32
Expand Down Expand Up @@ -60,7 +64,11 @@ RUN rm -rf ./node_modules/npm
RUN du -sh ./node_modules/* | sort -nr | grep '\dM.*'

FROM node:alpine as runner
RUN apk add vips-cpp
# Lemmy uses a bleeding edge version of vips, and the necessary version is only available in Alpine edge
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories && \
echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories

RUN apk update && apk upgrade && apk add vips-cpp
COPY --from=builder /usr/src/app/dist /app/dist
COPY --from=builder /usr/src/app/node_modules /app/node_modules

Expand Down

0 comments on commit e164ee4

Please sign in to comment.