-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (34 loc) · 1.28 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
34
35
36
37
38
39
40
41
42
FROM node:16-alpine
# Install packages https://pkgs.alpinelinux.org/packages
RUN apk --no-cache add \
curl \
yarn \
git \
bash
RUN apk add --upgrade apk-tools && apk upgrade --available
# npm uses SSH to get code from github.
# We use https instead to skip the manual ssh fingerprint acceptance.
RUN git config --global url."https://github.com/".insteadOf [email protected]: && \
git config --global url."https://".insteadOf git:// && \
git config --global url."https://".insteadOf ssh://
# Install merge-descriptors
RUN npm install --global merge-descriptors
# update globals
RUN npm update --global
# OS information to file
RUN echo "IMAGE INFORMATION" > KTH_OS
RUN echo "Alpine version: `cat /etc/alpine-release `" >> KTH_OS
RUN echo "Build date: `date`" >> KTH_OS
# NodeJS information to file
RUN echo "IMAGE INFORMATION" > KTH_NODEJS
RUN echo "Based on: node:16-alpine " >> KTH_NODEJS
RUN echo "Build date: `date`" >> KTH_NODEJS
RUN echo "Node: `node --version`" >> KTH_NODEJS
RUN echo "NPM: `npm --version`" >> KTH_NODEJS
RUN echo "Yarn: `yarn --version`" >> KTH_NODEJS
RUN echo "" >> KTH_NODEJS
RUN echo "--- Default global packages ---" >> KTH_NODEJS
RUN echo "`npm list -g --depth 0`" >> KTH_NODEJS
# Finally output for CI logs.
RUN cat KTH_OS
RUN cat KTH_NODEJS