-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile copy.vscode
43 lines (32 loc) · 1.33 KB
/
Dockerfile copy.vscode
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
FROM node:18.18-alpine
ARG DEBIAN_FRONTEND=noninteractive
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create the user
RUN apk add doas git github-cli; \
adduser $USERNAME -G wheel; \
echo 'permit nopass :wheel as root' >> /etc/doas.d/doas.conf
# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
RUN git config --global url."[email protected]:".insteadOf "https://ssh.dev.azure.com/"
## fix npm file issues
RUN mkdir /tmp/npm \
&& mkdir /tmp/npm-cache \
&& npm config set prefix /tmp/npm \
&& npm config set cache /tmp/npm-cache \
&& chown -R $USERNAME /tmp/npm \
&& mkdir /workspaces && chown -R $USERNAME /workspaces
## fix M1 pupetteer issues
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
COPY . /tmp/npm
RUN doas chown -R $USERNAME /tmp/npm
RUN npm config set prefix /tmp/npm
RUN yarn config set prefix /tmp/npm
RUN cd /tmp/npm && npm i
# RUN git clone https://github.com/AirWalk-Digital/airview-mdx.git /tmp/airview-mdx && cd /tmp/airview-mdx && npm i && npm link