Skip to content

Commit 9e57857

Browse files
committed
feat: universal arm
1 parent a96c1ea commit 9e57857

File tree

17 files changed

+803
-1
lines changed

17 files changed

+803
-1
lines changed

.github/workflows/build-dev-container.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Build and run Dev Container task
6868
uses: devcontainers/[email protected]
6969
with:
70-
subFolder: ./templates/${{ matrix.dir }}
70+
subFolder: ./templates${{ matrix.platform == 'linux/arm64' && '-arm' || '' }}/${{ matrix.dir }}
7171
imageName: ghcr.io/pnstack/codespace/${{ matrix.dir }}${{ matrix.platform == 'linux/arm64' && '-arm' || '' }}
7272
cacheFrom: ghcr.io/pnstack/codespace/${{ matrix.dir }}:latest
7373
imageTag: ${{ github.ref == 'refs/heads/main' && 'latest' || steps.meta.outputs.tags }}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM ubuntu:focal
7+
8+
COPY first-run-notice.txt /tmp/scripts/
9+
10+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11+
# Restore man command
12+
&& yes | unminimize 2>&1
13+
14+
ENV LANG="C.UTF-8"
15+
16+
# Install basic build tools
17+
RUN apt-get update \
18+
&& apt-get upgrade -y \
19+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
20+
make \
21+
unzip \
22+
# The tools in this package are used when installing packages for Python
23+
build-essential \
24+
swig3.0 \
25+
# Required for Microsoft SQL Server
26+
unixodbc-dev \
27+
# Required for PostgreSQL
28+
libpq-dev \
29+
# Required for mysqlclient
30+
default-libmysqlclient-dev \
31+
# Required for ts
32+
moreutils \
33+
rsync \
34+
zip \
35+
libgdiplus \
36+
jq \
37+
# By default pip is not available in the buildpacks image
38+
python-pip-whl \
39+
python3-pip \
40+
#.NET Core related pre-requisites
41+
libc6 \
42+
libgcc1 \
43+
libgssapi-krb5-2 \
44+
libncurses5 \
45+
liblttng-ust0 \
46+
libssl-dev \
47+
libstdc++6 \
48+
zlib1g \
49+
libuuid1 \
50+
libunwind8 \
51+
sqlite3 \
52+
libsqlite3-dev \
53+
software-properties-common \
54+
tk-dev \
55+
uuid-dev \
56+
curl \
57+
gettext \
58+
inotify-tools \
59+
&& rm -rf /var/lib/apt/lists/* \
60+
# This is the folder containing 'links' to benv and build script generator
61+
&& apt-get update \
62+
&& apt-get upgrade -y \
63+
&& add-apt-repository universe \
64+
&& rm -rf /var/lib/apt/lists/*
65+
66+
# Verify expected build and debug tools are present
67+
RUN apt-get update \
68+
&& apt-get -y install build-essential cmake cppcheck valgrind clang lldb llvm gdb python3-dev \
69+
# Install tools and shells not in common script
70+
&& apt-get install -yq vim vim-doc xtail software-properties-common libsecret-1-dev \
71+
# Install additional tools (useful for 'puppeteer' project)
72+
&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
73+
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
74+
# Clean up
75+
&& apt-get autoremove -y && apt-get clean -y \
76+
# Move first run notice to right spot
77+
&& mkdir -p "/usr/local/etc/vscode-dev-containers/" \
78+
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/
79+
80+
# Default to bash shell (other shells available at /usr/bin/fish and /usr/bin/zsh)
81+
ENV SHELL=/bin/bash \
82+
DOCKER_BUILDKIT=1
83+
84+
# Install and setup fish
85+
RUN apt-get install -yq fish \
86+
&& FISH_PROMPT="function fish_prompt\n set_color green\n echo -n (whoami)\n set_color normal\n echo -n \":\"\n set_color blue\n echo -n (pwd)\n set_color normal\n echo -n \"> \"\nend\n" \
87+
&& printf "$FISH_PROMPT" >> /etc/fish/functions/fish_prompt.fish \
88+
&& printf "if type code-insiders > /dev/null 2>&1; and not type code > /dev/null 2>&1\n alias code=code-insiders\nend" >> /etc/fish/conf.d/code_alias.fish
89+
90+
# Remove scripts now that we're done with them
91+
RUN apt-get clean -y && rm -rf /tmp/scripts
92+
93+
# Mount for docker-in-docker
94+
VOLUME [ "/var/lib/docker" ]
95+
96+
# Fire Docker/Moby script if needed
97+
ENTRYPOINT [ "/usr/local/share/docker-init.sh", "/usr/local/share/ssh-init.sh"]
98+
CMD [ "sleep", "infinity" ]
99+
100+
# [Optional] Install debugger for development of Codespaces - Not in resulting image by default
101+
ARG DeveloperBuild
102+
RUN if [ -z $DeveloperBuild ]; then \
103+
echo "not including debugger" ; \
104+
else \
105+
curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /vsdbg ; \
106+
fi
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers-contrib/features/poetry": {
4+
"version": "2.0.17",
5+
"resolved": "ghcr.io/devcontainers-contrib/features/poetry@sha256:85ad0e0190682104214e5ae4faa2bf8c2e181802567c01db0ef2dc9a70790f32",
6+
"integrity": "sha256:85ad0e0190682104214e5ae4faa2bf8c2e181802567c01db0ef2dc9a70790f32"
7+
},
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"version": "2.5.1",
10+
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:9da676524999513412f2c27604d786ba0bbf3575eb1859166c5a1233f037fc08",
11+
"integrity": "sha256:9da676524999513412f2c27604d786ba0bbf3575eb1859166c5a1233f037fc08"
12+
},
13+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
14+
"version": "2.11.0",
15+
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:503f23cd692325b3cbb8c20a0ecfabb3444b0c786b363e0c82572bd7d71dc099",
16+
"integrity": "sha256:503f23cd692325b3cbb8c20a0ecfabb3444b0c786b363e0c82572bd7d71dc099"
17+
},
18+
"ghcr.io/devcontainers/features/dotnet:2": {
19+
"version": "2.1.3",
20+
"resolved": "ghcr.io/devcontainers/features/dotnet@sha256:719edd093c82315d41baaf99d09a3b546d69aaf73cf7d85ddc2fb646fd95581d",
21+
"integrity": "sha256:719edd093c82315d41baaf99d09a3b546d69aaf73cf7d85ddc2fb646fd95581d"
22+
},
23+
"ghcr.io/devcontainers/features/git-lfs:1": {
24+
"version": "1.2.2",
25+
"resolved": "ghcr.io/devcontainers/features/git-lfs@sha256:63f984a3c3c794f25f6e188d5fe63d693d4a2e58cb033c4cef38b97650d2cf26",
26+
"integrity": "sha256:63f984a3c3c794f25f6e188d5fe63d693d4a2e58cb033c4cef38b97650d2cf26"
27+
},
28+
"ghcr.io/devcontainers/features/git:1": {
29+
"version": "1.3.2",
30+
"resolved": "ghcr.io/devcontainers/features/git@sha256:63c96e8ac33f5630300d8883e2ec3123278de70d318589af596ea1954846014d",
31+
"integrity": "sha256:63c96e8ac33f5630300d8883e2ec3123278de70d318589af596ea1954846014d"
32+
},
33+
"ghcr.io/devcontainers/features/github-cli:1": {
34+
"version": "1.0.13",
35+
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:13b301a039ce9e0bb07d45ea0c106c946cfff01c3b9844bbec6b0c7bacba8de3",
36+
"integrity": "sha256:13b301a039ce9e0bb07d45ea0c106c946cfff01c3b9844bbec6b0c7bacba8de3"
37+
},
38+
"ghcr.io/devcontainers/features/go:1": {
39+
"version": "1.3.0",
40+
"resolved": "ghcr.io/devcontainers/features/go@sha256:6adad519ea1b49989de42ce5bde5add32748cae68eeb6034db4c2d69e87c161b",
41+
"integrity": "sha256:6adad519ea1b49989de42ce5bde5add32748cae68eeb6034db4c2d69e87c161b"
42+
},
43+
"ghcr.io/devcontainers/features/hugo:1": {
44+
"version": "1.1.2",
45+
"resolved": "ghcr.io/devcontainers/features/hugo@sha256:60233d58f5b8b875e38b96222004b9be2f8401887c9df9509b1dc42fe1b2f95f",
46+
"integrity": "sha256:60233d58f5b8b875e38b96222004b9be2f8401887c9df9509b1dc42fe1b2f95f"
47+
},
48+
"ghcr.io/devcontainers/features/java:1": {
49+
"version": "1.6.0",
50+
"resolved": "ghcr.io/devcontainers/features/java@sha256:43d44db01191871fa077ebaa38794f8f5ee41cb6e1b282625db5d0ad4e61bc99",
51+
"integrity": "sha256:43d44db01191871fa077ebaa38794f8f5ee41cb6e1b282625db5d0ad4e61bc99"
52+
},
53+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
54+
"version": "1.2.0",
55+
"resolved": "ghcr.io/devcontainers/features/kubectl-helm-minikube@sha256:ff50f0f68095dc2dadeb9bfd7e509b21b9fcfe012d708b303c55f7bedfa462d0",
56+
"integrity": "sha256:ff50f0f68095dc2dadeb9bfd7e509b21b9fcfe012d708b303c55f7bedfa462d0"
57+
},
58+
"ghcr.io/devcontainers/features/node:1": {
59+
"version": "1.5.0",
60+
"resolved": "ghcr.io/devcontainers/features/node@sha256:a124954d7ed085eb90e08e6fcecac8cbcbb866317ab16deb2c7797d63cbf35d6",
61+
"integrity": "sha256:a124954d7ed085eb90e08e6fcecac8cbcbb866317ab16deb2c7797d63cbf35d6"
62+
},
63+
"ghcr.io/devcontainers/features/oryx:1": {
64+
"version": "1.3.6",
65+
"resolved": "ghcr.io/devcontainers/features/oryx@sha256:6b055e778ede929dbe70b6ecbd1264ab1a5727570c90d325320e02e295319c93",
66+
"integrity": "sha256:6b055e778ede929dbe70b6ecbd1264ab1a5727570c90d325320e02e295319c93"
67+
},
68+
"ghcr.io/devcontainers/features/php:1": {
69+
"version": "1.1.3",
70+
"resolved": "ghcr.io/devcontainers/features/php@sha256:5bc18bd53a6f01b7e684ca4139de9c1eadabebc7086027434f5920229adac473",
71+
"integrity": "sha256:5bc18bd53a6f01b7e684ca4139de9c1eadabebc7086027434f5920229adac473"
72+
},
73+
"ghcr.io/devcontainers/features/python:1": {
74+
"version": "1.6.3",
75+
"resolved": "ghcr.io/devcontainers/features/python@sha256:d39ab88c01ce5a1e96c9a453b3e6f65b71365f8d3275b7b4e828ecb8a75d289b",
76+
"integrity": "sha256:d39ab88c01ce5a1e96c9a453b3e6f65b71365f8d3275b7b4e828ecb8a75d289b"
77+
},
78+
"ghcr.io/devcontainers/features/ruby:1": {
79+
"version": "1.2.3",
80+
"resolved": "ghcr.io/devcontainers/features/ruby@sha256:a2878739745cb61b3088d758fdfbbbcb4b13f17734f84fa5f797af667bbf0545",
81+
"integrity": "sha256:a2878739745cb61b3088d758fdfbbbcb4b13f17734f84fa5f797af667bbf0545"
82+
},
83+
"ghcr.io/devcontainers/features/sshd:1": {
84+
"version": "1.0.9",
85+
"resolved": "ghcr.io/devcontainers/features/sshd@sha256:7f6467f25d23c47371ba59f6f3350c9de3439a4d4cdf7497ae50e8aca40bc0e0",
86+
"integrity": "sha256:7f6467f25d23c47371ba59f6f3350c9de3439a4d4cdf7497ae50e8aca40bc0e0"
87+
}
88+
}
89+
}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
// original image: mcr.microsoft.com/devcontainers/universal:2
2+
{
3+
"build": {
4+
"dockerfile": "./Dockerfile",
5+
"context": "."
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"username": "codespace",
10+
"userUid": "1000",
11+
"userGid": "1000"
12+
},
13+
"ghcr.io/devcontainers/features/dotnet:2": {
14+
"version": "8.0",
15+
"dotnetRuntimeVersions": "7.0",
16+
"aspNetCoreRuntimeVersions": "7.0"
17+
},
18+
"ghcr.io/devcontainers/features/hugo:1": {
19+
"version": "latest"
20+
},
21+
"ghcr.io/devcontainers/features/node:1": {
22+
"version": "20",
23+
"additionalVersions": "18"
24+
},
25+
"./local-features/nvs": "latest",
26+
"ghcr.io/devcontainers/features/python:1": {
27+
"version": "3.12.1",
28+
"additionalVersions": "3.11.9",
29+
"installJupyterlab": "true",
30+
"configureJupyterlabAllowOrigin": "*",
31+
"useOryxIfAvailable": "false"
32+
},
33+
"./local-features/machine-learning-packages": "latest",
34+
"ghcr.io/devcontainers/features/php:1": {
35+
"version": "8.3.0",
36+
"additionalVersions": "8.2.13",
37+
"installComposer": "true"
38+
},
39+
// "ghcr.io/devcontainers/features/conda:1": {
40+
// "version": "latest"
41+
// },
42+
"ghcr.io/devcontainers/features/ruby:1": {
43+
"version": "3.3.4",
44+
"additionalVersions": "3.3.2"
45+
},
46+
"ghcr.io/devcontainers/features/java:1": {
47+
"version": "21",
48+
"additionalVersions": "17",
49+
"installGradle": "true",
50+
"installMaven": "true"
51+
},
52+
"ghcr.io/devcontainers/features/sshd:1": {
53+
"version": "latest"
54+
},
55+
"ghcr.io/devcontainers/features/git:1": {
56+
"version": "latest",
57+
"ppa": "false"
58+
},
59+
"ghcr.io/devcontainers/features/git-lfs:1": {
60+
"version": "latest"
61+
},
62+
"ghcr.io/devcontainers/features/github-cli:1": {
63+
"version": "latest"
64+
},
65+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
66+
"version": "latest"
67+
},
68+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
69+
"version": "latest"
70+
},
71+
"ghcr.io/devcontainers/features/go:1": {
72+
"version": "latest"
73+
},
74+
"./local-features/jekyll": "latest",
75+
"ghcr.io/devcontainers/features/oryx:1": "latest",
76+
"./local-features/setup-user": "latest",
77+
"./local-features/patch-python": {}
78+
// "./local-features/patch-conda": {}
79+
},
80+
"overrideFeatureInstallOrder": [
81+
"ghcr.io/devcontainers/features/common-utils",
82+
"ghcr.io/devcontainers/features/git",
83+
"ghcr.io/devcontainers/features/dotnet",
84+
"ghcr.io/devcontainers/features/hugo",
85+
"ghcr.io/devcontainers/features/node",
86+
"./local-features/nvs",
87+
// "ghcr.io/devcontainers/features/conda",
88+
// "./local-features/patch-conda",
89+
"ghcr.io/devcontainers/features/python",
90+
"./local-features/patch-python",
91+
"./local-features/machine-learning-packages",
92+
"ghcr.io/devcontainers/features/php",
93+
"ghcr.io/devcontainers/features/ruby",
94+
"ghcr.io/devcontainers/features/java",
95+
"ghcr.io/devcontainers/features/sshd",
96+
"ghcr.io/devcontainers/features/git-lfs",
97+
"ghcr.io/devcontainers/features/github-cli",
98+
"ghcr.io/devcontainers/features/docker-in-docker",
99+
"ghcr.io/devcontainers/features/kubectl-helm-minikube",
100+
"ghcr.io/devcontainers/features/go",
101+
"./local-features/jekyll",
102+
"ghcr.io/devcontainers/features/oryx",
103+
"./local-features/setup-user"
104+
],
105+
"remoteUser": "codespace",
106+
"containerUser": "codespace",
107+
108+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
109+
"forwardPorts": [8000],
110+
111+
// Configure tool-specific properties.
112+
"customizations": {
113+
// Configure properties specific to VS Code.
114+
"vscode": {
115+
// Set *default* container specific settings.json values on container create.
116+
"settings": {
117+
"go.toolsManagement.checkForUpdates": "local",
118+
"go.useLanguageServer": true,
119+
"go.gopath": "/go",
120+
"python.defaultInterpreterPath": "/home/codespace/.python/current/bin/python3",
121+
"jupyter.kernels.filter": [
122+
{
123+
"path": "/opt/conda/bin/python",
124+
"type": "pythonEnvironment"
125+
},
126+
{
127+
"path": "/usr/local/python/current/bin/python3",
128+
"type": "pythonEnvironment"
129+
},
130+
{
131+
"path": "/usr/local/python/current/bin/python",
132+
"type": "pythonEnvironment"
133+
},
134+
{
135+
"path": "/usr/bin/python3",
136+
"type": "pythonEnvironment"
137+
},
138+
{
139+
"path": "/bin/python3",
140+
"type": "pythonEnvironment"
141+
}
142+
],
143+
"lldb.executable": "/usr/bin/lldb"
144+
},
145+
// Add the IDs of extensions you want installed when the container is created.
146+
"extensions": ["GitHub.vscode-pull-request-github"]
147+
}
148+
}
149+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
👋 Welcome to Codespaces! You are on our default image.
2+
- It includes runtimes and tools for Python, Node.js, Docker, and more. See the full list here: https://aka.ms/ghcs-default-image
3+
- Want to use a custom image instead? Learn more here: https://aka.ms/configure-codespace
4+
5+
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).
6+
7+
📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.
8+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"id": "jekyll",
3+
"name": "Jekyll",
4+
"options": {
5+
"version": {
6+
"type": "string",
7+
"proposals": [
8+
"latest"
9+
],
10+
"default": "latest",
11+
"description": "Select or enter a version."
12+
}
13+
},
14+
"install": {
15+
"app": "",
16+
"file": "install.sh"
17+
}
18+
}

0 commit comments

Comments
 (0)