-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile-release
64 lines (47 loc) · 1.38 KB
/
Dockerfile-release
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
59
60
61
62
63
64
FROM node:20-alpine3.20
LABEL maintainer="Vishal Mahajan"
ARG SVELTE_PATH=/opt/svelte
ARG APP_PATH=/app
ARG NPM_PATH=/opt/npm-global
ARG GIT_USERNAME="JHipster Svelte Bot"
ARG GID=1000
ARG UID=1000
ENV MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
RUN apk update \
&& apk --no-cache --update add \
gcompat \
git \
openjdk21 \
ca-certificates \
wget \
bash
RUN sed -i -e "s/bin\/ash/bin\/sh/" /etc/passwd
RUN \
echo ${GID} \
&& echo ${UID}
RUN \
deluser --remove-home node \
&& (addgroup -S jsvelte -g ${GID} || addgroup -S jsvelte ) \
&& (adduser -S -G jsvelte -u ${UID} jsvelte || adduser -S -G jsvelte jsvelte)
RUN \
mkdir -p $APP_PATH \
&& mkdir -p $SVELTE_PATH \
&& mkdir -p $NPM_PATH \
&& chown -R jsvelte:jsvelte $APP_PATH \
&& chown -R jsvelte:jsvelte $SVELTE_PATH \
&& chown -R jsvelte:jsvelte $NPM_PATH
USER jsvelte
RUN \
npm config set prefix "$NPM_PATH" \
&& echo PATH="$NPM_PATH/bin:$PATH" >> "$HOME/.profile" \
&& . "$HOME/.profile"
RUN npm install -g --no-audit --quiet [email protected]
WORKDIR $APP_PATH
RUN \
git config --global user.email "$GIT_USER_EMAIL" \
&& git config --global user.name "$GIT_USERNAME"
ENV PATH "$NPM_PATH/bin:$PATH"
VOLUME ["$APP_PATH"]
EXPOSE 9000 8080
ENTRYPOINT ["entrypoint.sh"]