-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.vscode
48 lines (36 loc) · 1.35 KB
/
Dockerfile.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
42
43
44
45
46
47
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; \
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 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
# RUN yarn
# ## fix npm file issues
# RUN mkdir /tmp/npm \
# && mkdir /tmp/npm/lib \
# && mkdir /tmp/npm-cache \
# && mkdir /tmp/app \
# && npm config set prefix /tmp/npm \
# && npm config set cache /tmp/npm-cache \
# && chown -R $USERNAME /tmp/npm \
# && chown -R $USERNAME /tmp/app \
# && mkdir /workspaces && chown -R $USERNAME /workspaces
# COPY . /tmp/app
# RUN doas chown -R $USERNAME /tmp/npm
# RUN doas chown -R $USERNAME /tmp/app
# RUN npm config set prefix /tmp/npm
# RUN yarn config set prefix /tmp/npm
# RUN cd /tmp/app && yarn