Skip to content

Commit

Permalink
Try ChatGPT 4 output
Browse files Browse the repository at this point in the history
  • Loading branch information
baso53 committed Dec 5, 2023
1 parent 2c764d6 commit e5fe388
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM arm32v6/node:20-alpine as dev
FROM arm32v6/node:21-alpine as dev

WORKDIR /usr/src/app

ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH

# Update and install packages using Alpine's package manager (apk)
RUN apk update && \
apk add \
apk add --no-cache \
autoconf \
build-essential \
build-base \
jq \
perl \
libnet-ssleay-perl \
Expand Down Expand Up @@ -54,7 +55,8 @@ RUN ./build-imagemagick.sh
RUN ./build-libvips.sh
RUN ./build-perllib-compress-brotli.sh

RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources
# Alpine does not have non-free repositories like Debian, so this line needs to be adjusted or removed
# RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apk/repositories
COPY bin/install-ffmpeg.sh bin/build-lock.json ./
RUN ./install-ffmpeg.sh

Expand All @@ -68,11 +70,13 @@ RUN umask 0333 && unzip /usr/src/resources/cities500.zip -d /usr/src/resources/
FROM arm32v6/node:iron-alpine as prod
WORKDIR /usr/src/app

RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources
# Alpine does not have non-free repositories like Debian, so this line needs to be adjusted or removed
# RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apk/repositories
COPY bin/install-ffmpeg.sh bin/build-lock.json ./

# Update and install packages using Alpine's package manager (apk)
RUN apk update && \
apk add \
apk add --no-cache \
ca-certificates \
$(if [ $(arch) = "x86_64" ]; then echo "intel-media-va-driver-non-free"; fi) \
jq \
Expand Down Expand Up @@ -102,8 +106,12 @@ RUN apk update && \
wget \
zlib1g && \
./install-ffmpeg.sh && \
apk del remove -yqq jq wget ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
apk del jq wget ca-certificates && \
apk add --no-cache --virtual .build-deps build-base && \
apk del .build-deps && \
apk add --no-cache --virtual .runtime-deps libstdc++ && \
apk del --purge .runtime-deps && \
rm -rf /var/cache/apk/* && \
rm install-ffmpeg.sh && \
rm build-lock.json

Expand Down

0 comments on commit e5fe388

Please sign in to comment.