Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website-cs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Feigl
website-cs
Commits
d3e05f4f
Commit
d3e05f4f
authored
1 month ago
by
Florian
Browse files
Options
Downloads
Patches
Plain Diff
dockerfile (non-root user)
parent
751e3d73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+21
-44
21 additions, 44 deletions
Dockerfile
Dockerfile.backup
+0
-39
0 additions, 39 deletions
Dockerfile.backup
with
21 additions
and
83 deletions
Dockerfile
+
21
−
44
View file @
d3e05f4f
FROM
hugomods/hugo:dart-sass
WORKDIR
/app
#
Systemabhängig
ke
i
te
n (
Puppeteer
/ Chromium / GUI-Komponenten / Fonts)
#
Chromium Pa
kete
für
Puppeteer
RUN
apk add
--no-cache
\
alsa-lib
\
atk
\
cairo
\
cups-libs
\
dbus-libs
\
expat
\
fontconfig
\
freetype
\
gcc
\
gcompat
\
gdk-pixbuf
\
glib
\
gtk+3.0
\
nspr
\
nss
\
pango
\
libx11
\
libxcomposite
\
libxcursor
\
libxdamage
\
libxext
\
libxfixes
\
libxi
\
libxrandr
\
libxrender
\
libxss
\
libxtst
\
ca-certificates
\
ttf-liberation
\
xdg-utils
\
wget
\
chromium
\
harfbuzz
\
font-noto
\
font-noto-cjk
\
font-noto-emoji
\
bash
openssl
\
chromium
\
harfbuzz
\
ca-certificates
\
ttf-freefont
\
nss
\
freetype
\
font-noto
\
font-noto-cjk
\
font-noto-emoji
RUN
apk add
--no-cache
--repository
=
http://dl-cdn.alpinelinux.org/alpine/edge/testing lychee
# Fallback für Puppeteer
# Installiere pa11y-ci
RUN
npm
install
-g
pa11y-ci
# Non-root User einrichten
RUN
addgroup
-S
appgroup
&&
adduser
-S
appuser
-G
appgroup
# Setze Umgebungsvariablen für Puppeteer
ENV
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV
PUPPETEER_ARGS="--no-sandbox --disable-setuid-sandbox"
# Beispiel: pa11y install
RUN
npm
install
-g
pa11y
CMD
["sh"]
USER
appuser
WORKDIR
/home/appuser
This diff is collapsed.
Click to expand it.
Dockerfile.backup
deleted
100644 → 0
+
0
−
39
View file @
751e3d73
FROM hugomods/hugo:dart-sass-go-git
# hugo:dart-sass-go-git ohne node, da node23 Probleme mit pa11y-ci verursacht
# Fallback: node20
WORKDIR /app
# Installiere Chromium für Puppeteer
RUN apk add --no-cache \
openssl \
chromium \
harfbuzz \
ca-certificates \
ttf-freefont \
nss \
freetype \
font-noto \
font-noto-cjk \
font-noto-emoji \
curl \
tar \
xz
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing lychee
# Installiere Node.js 20.19.0
ENV NODE_VERSION=20.19.0
RUN curl -fsSL https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz | tar -xJ && \
mv node-v$NODE_VERSION-linux-x64 /usr/local/node && \
ln -sf /usr/local/node/bin/node /usr/local/bin/node && \
ln -sf /usr/local/node/bin/npm /usr/local/bin/npm && \
ln -sf /usr/local/node/bin/npx /usr/local/bin/npx
# Installiere pa11y-ci und lychee global
RUN npm install -g pa11y-ci
# Setze Umgebungsvariablen für Puppeteer
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_ARGS="--no-sandbox --disable-setuid-sandbox"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment