Update Dockerfile

This commit is contained in:
Alexandre
2024-03-18 13:44:38 +01:00
committed by GitHub
parent 859c966c46
commit 0d755d2243

View File

@@ -28,13 +28,38 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0 S6_SERVICES_GRACETIME=0
# Add postgres 16 FROM node:18.18-bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN \ RUN \
# Recreate data
mkdir /data_linkwarden
WORKDIR /data_linkwarden
RUN \
# Get repo
apt-get update && \ apt-get update && \
apt-get install -y postgresql postgresql-contrib && \ apt-get install -y git && \
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ git clone https://github.com/linkwarden/linkwarden.git && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ \
sudo apt-get update && apt-get install -y postgresql-16 # Adapt for sqlite
sed -i "s|postgresql|sqlite|g" linkwarden/prisma/schema.prisma && \
\
# Copy files
cp linkwarden/package.json linkwarden/yarn.lock linkwarden/playwright.config.ts .
# Increase timeout to pass github actions arm64 build
RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn yarn install --network-timeout 10000000
RUN npx playwright install-deps && \
apt-get clean && \
yarn cache clean
RUN cp -rnf linkwarden/* .
RUN yarn prisma generate && \
yarn build
################## ##################
# 3 Install apps # # 3 Install apps #