-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev.api
33 lines (30 loc) · 1.02 KB
/
Dockerfile.dev.api
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
# Copyright(c) 2022 aasaam software development group
FROM node:18-bullseye-slim
ARG PROXY_HTTP
RUN export DEBIAN_FRONTEND=noninteractive ; \
export LANG=en_US.utf8 ; \
export LC_ALL=C.UTF-8 ; \
export HTTP_PROXY=$PROXY_HTTP ; \
export HTTPS_PROXY=$PROXY_HTTP ; \
echo "You are using proxy: $PROXY_HTTP"; \
apt-get update -y \
&& apt-get autoremove -y \
&& apt-get -y upgrade && apt-get install -y --no-install-recommends curl ca-certificates golang-cfssl p7zip-full \
&& curl -sf https://gobinaries.com/tj/node-prune | sh \
&& echo 'cache = "/.npm"' > /root/.npmrc \
&& mkdir /.npm \
&& chown node:node /.npm -R \
&& npm -g update \
&& npm install -g npm \
&& npm install -g pm2 \
&& node-prune /usr/local/lib/node_modules \
&& echo "Versions: " \
&& node -v \
&& npm -v \
&& mkdir /app \
&& rm -rf /.npm \
&& mkdir /.npm \
&& chown node:node /.npm -R \
&& echo "1" \
&& rm -r /var/lib/apt/lists/* && rm -rf /tmp && mkdir /tmp && chmod 777 /tmp && truncate -s 0 /var/log/*.log
WORKDIR /app/api