Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <zoey@z0ey.de>
Zoey2936 authored May 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1981b44 commit 511c81b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# syntax=docker/dockerfile:labs
FROM --platform="$BUILDPLATFORM" alpine:3.19.1 as build
FROM --platform="$BUILDPLATFORM" node:18.20.2-alpine3.19 as build
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
ARG PT_VERSION=v6.1.0 \
TARGETARCH

RUN apk upgrade --no-cache -a && \
apk add --no-cache ca-certificates bash nodejs yarn npm git && \
apk add --no-cache ca-certificates bash git && \
yarn global add clean-modules && \
git clone --recursive https://github.com/Chocobozzz/PeerTube --branch "$PT_VERSION" /app && \
sed -i "s|gosu|su-exec|g" /app/support/docker/production/entrypoint.sh && \
if [ "$TARGETARCH" = "amd64" ]; then \
cd /app/client && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile && \
echo clean-modules --yes && \
clean-modules --yes && \
cd /app && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile && \
echo clean-modules --yes && \
clean-modules --yes && \
npm_config_target_platform=linux npm_config_target_arch=x64 npm run build && \
echo clean-modules --yes && \
clean-modules --yes && \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile --production && \
echo clean-modules --yes; \
clean-modules --yes; \
elif [ "$TARGETARCH" = "arm64" ]; then \
cd /app/client && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile && \
echo clean-modules --yes && \
clean-modules --yes && \
cd /app && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile && \
echo clean-modules --yes && \
clean-modules --yes && \
npm_config_target_platform=linux npm_config_target_arch=arm64 npm run build && \
echo clean-modules --yes && \
clean-modules --yes && \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile --production && \
echo clean-modules --yes; \
clean-modules --yes; \
fi && \
yarn cache clean --all

FROM alpine:3.19.1
FROM node:18.20.2-alpine3.19
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
COPY --from=build /app /app
WORKDIR /app

# Install dependencies
RUN apk add --no-cache ca-certificates tzdata tini ffmpeg su-exec shadow nodejs && \
RUN apk add --no-cache ca-certificates tzdata tini ffmpeg su-exec shadow && \
# Add peertube user
groupadd -r peertube && \
useradd -r -g peertube -m peertube && \

0 comments on commit 511c81b

Please sign in to comment.