1
1
# syntax=docker/dockerfile:1
2
- ARG PYTHON_VERSION="3.11 "
2
+ ARG PYTHON_VERSION="3.12 "
3
3
FROM mcr.microsoft.com/devcontainers/python:${PYTHON_VERSION}
4
4
5
5
LABEL org.opencontainers.image.authors="Ryan Boehning <1250684+ryboe@users.noreply.github.com>"
6
6
7
7
RUN <<-EOT
8
- apt update
9
- apt full-upgrade
10
- rm -rf /var/lib/apt/lists/*
8
+ apt update
9
+ apt full-upgrade
10
+ apt clean
11
+ rm -rf /var/lib/apt/lists/*
11
12
EOT
12
13
13
14
# Enable pipefail to catch errors.
@@ -17,26 +18,25 @@ SHELL ["/bin/zsh", "-o", "pipefail", "-c"]
17
18
RUN sed -i 's/\/ home\/ vscode:\/ bin\/ bash/\/ home\/ vscode:\/ bin\/ zsh/' /etc/passwd
18
19
USER vscode
19
20
20
- # Create local bin directory for gh, poetry, and other command line tools.
21
- RUN mkdir -p /home/vscode/.local/bin
22
- ENV PATH="/home/vscode/.local/bin:$PATH"
23
-
24
21
# Remove shell configs from the base image.
25
22
RUN rm -rf ~/.bash_logout ~/.bashrc ~/.oh-my-zsh ~/.profile
26
23
27
- # Install the latest gh CLI tool. The first request fetches the URL for the
28
- # latest release tarball. The second request downloads the tarball.
24
+ # Create local bin directory for gh, poetry, and other command line tools.
25
+ RUN mkdir -p /home/vscode/.local/bin
26
+
27
+ # Install poetry and enable its completions.
29
28
RUN <<-EOT
30
- wget --quiet --timeout=30 --output-document=- ' https://api.github.com/repos/cli/cli/releases/latest' |
31
- jq -r ".assets[] | select(.name | test( \" gh_.*?_linux_amd64.tar.gz \" )).browser_download_url" |
32
- wget --quiet --timeout=180 --input-file=- --output-document=- |
33
- tar -xvz -C /home/vscode/.local/ --strip-components=1
29
+ curl -sSL https://install.python-poetry.org | python -
30
+ mkdir -p ~/.zfunc
31
+ poetry completions zsh > ~/.zfunc/_poetrywhic
32
+ fpath+=~/.zfunc
34
33
EOT
35
34
36
- # Install poetry and enable its completions.
35
+ # Install the latest gh CLI tool. The first request fetches the URL for the
36
+ # latest release tarball. The second request downloads the tarball.
37
37
RUN <<-EOT
38
- curl -sSL https://install.python-poetry.org | python -
39
- mkdir -p ~/.zfunc
40
- poetry completions zsh > ~/.zfunc/_poetrywhic
41
- fpath+= ~/.zfunc
38
+ wget --quiet --timeout=30 --output-document=- ' https://api.github.com/repos/cli/cli/releases/latest' |
39
+ jq -r ".assets[] | select(.name | test( \" gh_.*?_linux_amd64.tar.gz \" )).browser_download_url" |
40
+ wget --quiet --timeout=180 --input-file=- --output-document=- |
41
+ tar -xvz -C ~/.local/bin --strip-components=2
42
42
EOT
0 commit comments