Change to alpine

pull/126/head
Zusier 3 years ago
parent f4459b3880
commit 0614ba0499

@ -4,19 +4,16 @@
# - Zusier <zusier@pm.me> (https://github.com/Zusier)
# Node 16 image
FROM node:16.14.0
FROM node:16.14.0-alpine3.15
# Set working directory
WORKDIR /opt/ass/
# create rootless user with uid/gid as 1000
RUN groupadd -g 1000 -o ass && useradd -m -u 1000 -g 1000 -o -s /bin/bash ass
# create rootless user with uid/gid as 1001
RUN addgroup -g 1001 ass && adduser --disabled-password --gecos "" --home "/opt/ass" --no-create-home --uid 1001 --ingroup ass ass
# Set permissions for rootless user
RUN chown -R ass /opt/ass/ && chmod -R 774 /opt/ass/
# run container as previously created user
USER ass
RUN chown -R ass /opt/ass/&& chmod -R 774 /opt/ass/
# Ensure these directories & files exist for compose volumes
RUN mkdir -p /opt/ass/uploads/thumbnails/ && \
@ -34,5 +31,7 @@ RUN npm i -g npm@8 typescript && \
npm run build && \
chown -R ass /usr/local/bin/npm
USER ass
# Start ass
CMD npm start
CMD npm start

@ -9,7 +9,7 @@ services:
command: npm start
container_name: ass-docker
restart: unless-stopped
user: 1000:1000
user: 1001:1001
ports:
- "40115:40115"
volumes:

@ -17,7 +17,7 @@ do
done
# Ensure proper file permissions for rootless
chown -R 1000:1000 config.json auth.json data.json uploads share
chown -R 1001:1001 config.json auth.json data.json uploads share
chmod -R 774 config.json data.json uploads share
# Wait for user to confirm

Loading…
Cancel
Save