-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.blade.php
More file actions
51 lines (43 loc) · 1.45 KB
/
Dockerfile.blade.php
File metadata and controls
51 lines (43 loc) · 1.45 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
FROM {{ $from }}
ENV ASUSER= \
UID=0 \
ENTRYPOINT=entrypoint.node.sh
WORKDIR /app
RUN adduser -D -u 1337 kool && deluser --remove-home node \
# deps
&& apk add --no-cache \
bash \
git \
shadow \
su-exec \
curl \
# build tools
g++ \
libpng-dev \
make \
zlib-dev \
&& npm install -g pnpm \
# pnpm global settings live in ~/.config/pnpm/rc so npm does not warn on unknown keys in ~/.npmrc (npm 11+)
&& mkdir -p /root/.config/pnpm /home/kool/.config/pnpm \
&& printf '%s\n' \
'store-dir=/root/.pnpm-store' \
'package-import-method=copy' \
'shamefully-hoist=true' \
'scripts-prepend-node-path=true' \
> /root/.config/pnpm/rc \
&& printf '%s\n' \
'store-dir=/home/kool/.pnpm-store' \
'package-import-method=copy' \
'shamefully-hoist=true' \
'scripts-prepend-node-path=true' \
> /home/kool/.config/pnpm/rc \
&& chown -R kool:kool /home/kool/.config \
&& rm -rf rm -rf /root/.npm/* \
# dockerize
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz | tar xz \
&& mv dockerize /usr/local/bin/dockerize
COPY entrypoint /entrypoint
RUN chmod +x /entrypoint
RUN mkdir -p /usr/local/lib/node_modules && chmod -R 777 /usr/local/lib/node_modules
RUN npm i --location=global npm@latest
ENTRYPOINT [ "/entrypoint" ]