-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (34 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
41 lines (34 loc) · 1.02 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
FROM ghcr.io/trueforge-org/node:24.14.1@sha256:d823f0ad31f49d9944d39857b673a0aef31e9d6edbff53b855d7a1f1b63512f6
# set version label
ARG VERSION
ARG TARGETARCH
USER root
RUN \
echo "**** install runtime packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
nginx \
tftp-hpa && \
echo "**** install build packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
npm && \
echo "**** install WebApp ****" && \
(curl -fL -o \
/tmp/webapp.tar.gz \
"https://github.com/netbootxyz/webapp/archive/refs/tags/${VERSION}.tar.gz" || curl -fL -o \
/tmp/webapp.tar.gz \
"https://github.com/netbootxyz/webapp/archive/refs/tags/v${VERSION}.tar.gz") && \
tar xf \
/tmp/webapp.tar.gz -C \
/app/ --strip-components=1 && \
npm install --prefix /app && \
echo "**** cleanup ****" && \
apt-get autoremove -y && \
rm -rf \
/tmp/*
# copy local files
USER apps
COPY --chmod=0755 . /
# app runs on port 3000
EXPOSE 3000
VOLUME /config
WORKDIR /config