-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (41 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
48 lines (41 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ghcr.io/trueforge-org/node:22.22.1@sha256:f3730b32628892a22dfa85e96750e83ab5f3e85c6170915e19110c134ab649e8
# set version label
ARG VERSION
ARG TARGETARCH
USER root
ENV HOME="/config"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
openssl && \
echo "**** install app ****" && \
mkdir -p \
/app/mstream && \
(curl -fL -o \
/tmp/mstream.tar.gz \
"https://github.com/IrosTheBeggar/mStream/archive/refs/tags/v${VERSION}.tar.gz" || curl -fL -o \
/tmp/mstream.tar.gz \
"https://github.com/IrosTheBeggar/mStream/archive/refs/tags/${VERSION}.tar.gz") && \
tar xzf \
/tmp/mstream.tar.gz -C \
/app/mstream/ --strip-components=1 && \
cd /app/mstream && \
npm install --omit=dev && \
chown -R apps:apps ./ && \
npm link && \
echo "**** cleanup ****" && \
rm -rf /app/mstream/save/sync && \
ln -s /config/sync /app/mstream/save/sync && \
apt-get autoremove -y && \
rm -rf \
$HOME/.cache \
$HOME/.npm \
/tmp/* \
/tmp/.npm
# add local files
USER apps
COPY --chmod=0755 . /
# ports and volumes
EXPOSE 3000
VOLUME /config
WORKDIR /config