1
+ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/python-3/.devcontainer/base.Dockerfile
2
+
3
+ # [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
4
+ ARG VARIANT="3.9"
5
+ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6
+
7
+ # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8
+ ARG NODE_VERSION="none"
9
+ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10
+
11
+ # [Option] Install zsh
12
+ ARG INSTALL_ZSH="true"
13
+ # [Option] Upgrade OS packages to their latest versions
14
+ ARG UPGRADE_PACKAGES="false"
15
+ # [Option] Enable non-root Docker access in container
16
+ ARG ENABLE_NONROOT_DOCKER="true"
17
+ # [Option] Use the OSS Moby Engine instead of the licensed Docker Engine
18
+ ARG USE_MOBY="true"
19
+
20
+ # Install needed packages and setup non-root user. Use a separate RUN statement to add your
21
+ # own dependencies. A user of "automatic" attempts to reuse an user ID if one already exists.
22
+ ARG USERNAME=automatic
23
+ ARG USER_UID=1000
24
+ ARG USER_GID=$USER_UID
25
+
26
+ # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
27
+ COPY requirements.txt /tmp/pip-tmp/
28
+ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
29
+ && rm -rf /tmp/pip-tmp
30
+
31
+ # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
32
+ # && apt-get -y install --no-install-recommends <your-package-list-here>
33
+
34
+
35
+ # [Optional] Uncomment this line to install global node packages.
36
+ # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
37
+
38
+ RUN curl https://raw.githubusercontent.com/nektos/act/master/install.sh > /tmp/install-act.sh \
39
+ && chmod a+x /tmp/install-act.sh \
40
+ && /tmp/install-act.sh v0.2.20
41
+
42
+ COPY library-scripts/*.sh /tmp/library-scripts/
43
+
44
+
45
+ RUN apt-get update \
46
+ && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
47
+ && /bin/bash /tmp/library-scripts/desktop-lite-debian.sh \
48
+ # Use Docker script from script library to set things up
49
+ && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "${ENABLE_NONROOT_DOCKER}" "${USERNAME}" "${USE_MOBY}" \
50
+ && apt-get -y install --no-install-recommends mariadb-client \
51
+ && wget https://github.com/planetscale/cli/releases/download/v0.77.0/pscale_0.77.0_linux_amd64.deb \
52
+ && dpkg -i pscale_0.77.0_linux_amd64.deb \
53
+ && apt-get update && export DEBIAN_FRONTEND=noninteractive \
54
+ && curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \
55
+ && apt-get -y install /tmp/chrome.deb \
56
+ && ALIASES="alias google-chrome='google-chrome --disable-dev-shm-usage'\nalias google-chrome-stable='google-chrome-stable --disable-dev-shm-usage'\n\alias x-www-browser='x-www-browser --disable-dev-shm-usage'\nalias gnome-www-browser='gnome-www-browser --disable-dev-shm-usage'" \
57
+ && echo "${ALIASES}" >> tee -a /etc/bash.bashrc \
58
+ && if type zsh > /dev/null 2>&1; then echo "${ALIASES}" >> /etc/zsh/zshrc; fi \
59
+ # Clean up
60
+ && rm pscale_0.77.0_linux_amd64.deb \
61
+ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/
0 commit comments