Skip to content

Commit 5d0b9b1

Browse files
authored
Update dev container configuration (#388)
1 parent 7130326 commit 5d0b9b1

File tree

4 files changed

+16
-41
lines changed

4 files changed

+16
-41
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/ubuntu/.devcontainer/base.Dockerfile
2-
3-
# [Choice] Ubuntu version (use hirsuite or bionic on local arm64/Apple Silicon): hirsute, focal, bionic
4-
ARG VARIANT="hirsute"
5-
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
1+
FROM mcr.microsoft.com/devcontainers/base:jammy
62

73
# [Optional] Uncomment this section to install additional OS packages.
84
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
95
# && apt-get -y install --no-install-recommends <your-package-list-here>
106

11-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12-
&& apt-get -y install --no-install-recommends \
13-
gettext-base=0.21-3ubuntu2 \
7+
# Install httpie
8+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
9+
RUN curl -SsL https://packages.httpie.io/deb/KEY.gpg | gpg --dearmor -o /usr/share/keyrings/httpie.gpg \
10+
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" > /etc/apt/sources.list.d/httpie.list \
11+
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
12+
&& apt-get install -y --no-install-recommends \
13+
httpie=3.2.1 \
14+
&& apt-get clean \
1415
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/ubuntu
31
{
42
"name": "Ubuntu",
53
"build": {
6-
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic
8-
// Use hirsute or bionic on local arm64/Apple Silicon.
9-
"args": { "VARIANT": "hirsute" }
4+
"dockerfile": "Dockerfile"
105
},
11-
12-
// Set *default* container specific settings.json values on container create.
13-
"settings": {},
14-
15-
16-
// Add the IDs of extensions you want installed when the container is created.
17-
"extensions": [],
18-
19-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
20-
// "forwardPorts": [],
21-
22-
// Use 'postCreateCommand' to run commands after the container is created.
23-
// "postCreateCommand": "uname -a",
24-
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",
25-
26-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
27-
"remoteUser": "vscode",
286
"features": {
29-
"git": "latest",
30-
"node": "16",
31-
"python": "3.10"
32-
}
7+
"ghcr.io/devcontainers/features/node:1": {}
8+
},
9+
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh"
3310
}

.devcontainer/postCreateCommand.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#!/bin/bash
22

33
npm install -g docsify-cli
4-
python -m pip install --upgrade pip setuptools
5-
python -m pip install --upgrade httpie

script/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ This repository has Visual Studio Code's development container configuration, so
3333
- [Developing inside a Container using Visual Studio Code Remote Development](https://code.visualstudio.com/docs/remote/containers)
3434
- [GitHub Codespaces Documentation - GitHub Docs](https://docs.github.com/codespaces)
3535

36-
The environment is based on Ubuntu 21.04 and includes:
36+
The environment is based on Ubuntu 22.04 and includes:
3737

3838
- Bash
39-
- Python 3.10
40-
- Node.js 16.x
39+
- Node.js 18.x
4140
- `jq`
4241
- `envsubst`
43-
- `http` ([HTTPie](https://github.com/httpie/httpie))
42+
- `http` ([HTTPie](https://httpie.io/))
4443

4544
### Local Configuration
4645

0 commit comments

Comments
 (0)