forked from boomerang-io/worker.cicd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-node
30 lines (22 loc) · 938 Bytes
/
Dockerfile-node
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
#Import the base docker image built
FROM ubuntu:20.10
# Set the SHELL to bash with pipefail option
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Prevent dialog during apt install
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /opt/bin
#Add Packages
RUN apt-get -y update && apt-get --no-install-recommends -y install bash sed grep curl coreutils nodejs npm ca-certificates make openssh-client git socat skopeo openssl jq
# Install img
RUN curl -fSL "https://github.com/genuinetools/img/releases/download/v0.5.10/img-linux-amd64" -o "/opt/bin/img" && chmod a+x "/opt/bin/img"
# Install nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && \
source ~/.nvm/nvm.sh && \
nvm use system && \
nvm run system --version
WORKDIR /cli
ADD ./package.json ./package-lock.json ./.npmrc ./
ADD ./scripts ./scripts
ADD ./commands ./commands
RUN npm install --production
ENTRYPOINT [ "npm", "start" ]