-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (50 loc) · 1.59 KB
/
Dockerfile
File metadata and controls
58 lines (50 loc) · 1.59 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
49
50
51
52
53
54
55
56
57
58
FROM ghcr.io/trueforge-org/node:22.22.1@sha256:f3730b32628892a22dfa85e96750e83ab5f3e85c6170915e19110c134ab649e8
# set version label
ARG VERSION
ARG TARGETARCH
USER root
ENV PORT=3000
RUN \
echo "**** install build packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libsass-dev \
npm && \
echo "**** install runtime packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
nodejs && \
echo "**** install raneto ****" && \
mkdir -p \
/app/raneto && \
(curl -fL -o \
/tmp/raneto-src.tar.gz \
"https://github.com/ryanlelek/Raneto/archive/refs/tags/${VERSION}.tar.gz" || curl -fL -o \
/tmp/raneto-src.tar.gz \
"https://github.com/ryanlelek/Raneto/archive/refs/tags/v${VERSION}.tar.gz") && \
tar xf \
/tmp/raneto-src.tar.gz -C \
/app/raneto --strip-components=1 && \
echo "**** install raneto node dev modules and build ****" && \
cd /app/raneto && \
sed -i \
's/upgradeInsecureRequests: \[\]/upgradeInsecureRequests: null/g' \
app/index.js && \
npm install --omit=dev && \
rm -rf /app/raneto/{content,config,sessions} && \
mkdir -p /config/{content,config,sessions} && \
chown -R apps:apps /config && \
ln -s /config/content /app/raneto/content && \
ln -s /config/config /app/raneto/config && \
ln -s /config/sessions /app/raneto/sessions && \
echo "**** cleanup ****" && \
apt-get autoremove -y && \
rm -rf \
$HOME/.npm \
/tmp/*
# copy local files
USER apps
COPY --chmod=0755 . /
# ports and volumes
EXPOSE 3000
VOLUME /config
WORKDIR /config