-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.02 KB
/
Dockerfile
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
FROM alpine:3.21.0 as cli
WORKDIR /tmp
RUN NODE_VERSION=16.13.1 \
&& GOSU_VERSION=1.14 \
&& apk --no-cache add curl \
&& ARCHITECTURE=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) \
&& curl -LO https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCHITECTURE.tar.xz \
&& tar xvf node-v$NODE_VERSION-linux-$ARCHITECTURE.tar.xz \
&& mv node-v$NODE_VERSION-linux-$ARCHITECTURE node \
&& ARCHITECTURE=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& curl -LO https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$ARCHITECTURE \
&& chmod +x gosu-$ARCHITECTURE \
&& mv gosu-$ARCHITECTURE gosu
FROM ubuntu:24.04
COPY --from=cli /tmp/node /opt/node
COPY --from=cli /tmp/gosu /opt/cli/gosu
ENV PATH /opt/node/bin:/opt/cli:$PATH
WORKDIR /app
COPY . /app
RUN npm install -g yarn \
&& yarn remove cypress \
&& yarn install \
&& yarn cache clean
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["--help"]