-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile.devcontainer
51 lines (41 loc) · 1.44 KB
/
Dockerfile.devcontainer
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
48
49
50
51
FROM ubuntu:20.04
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser \
&& mkdir -p /setup
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
# Install Linux packages
ADD tools/install-deps.sh /tmp/
ADD tools/azure_cli_deb_install.sh /tmp/
RUN bash /tmp/install-deps.sh
# Add xvfb init script
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
USER builduser
WORKDIR /home/builduser
# Configure build-tools
RUN rm -rf /home/builduser/.electron_build_tools && \
git clone https://github.com/electron/build-tools.git /home/builduser/.electron_build_tools && \
cd /home/builduser/.electron_build_tools && \
npx --yes yarn && \
sudo locale-gen "en_US.UTF-8"
# Configure VNC
COPY tools/vnc-setup.sh /tmp/library-scripts/
RUN sudo apt update && export DEBIAN_FRONTEND=noninteractive \
&& sudo bash /tmp/library-scripts/vnc-setup.sh \
&& sudo add-apt-repository ppa:mozillateam/ppa \
&& sudo apt -y install firefox-esr \
&& sudo apt clean -y && sudo rm -rf /var/lib/apt/lists/* /tmp/library-scripts/
# Env vars for VNC
ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" \
VNC_RESOLUTION="1440x768x16" \
VNC_DPI="96" \
VNC_PORT="5901" \
NOVNC_PORT="6080" \
DISPLAY=":1" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8"
COPY tools/bashrc-setup.sh /tmp/library-scripts/
RUN bash /tmp/library-scripts/bashrc-setup.sh
ENTRYPOINT ["/usr/local/share/desktop-init.sh"]