-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (17 loc) · 931 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/vscode/devcontainers/base:alpine
LABEL org.opencontainers.image.authors="Ryan Boehning <1250684+ryboe@users.noreply.github.com>"
ARG ARCHITECTURE="amd64"
# Install the latest gh CLI tool. The first request fetches the URL for the
# latest release tarball. The second request downloads the tarball.
RUN <<-EOT
wget --quiet --timeout=30 --output-document=- 'https://api.github.com/repos/cli/cli/releases/latest' |
jq -r ".assets[] | select(.name | test(\"gh_.*?_linux_${ARCHITECTURE}.tar.gz\")).browser_download_url" |
wget --quiet --timeout=180 --input-file=- --output-document=- |
sudo tar -xvz -C /usr/local/ --strip-components=1
EOT
# Many tools need a C compiler (gcc) and a C stdlib (musl-dev).
RUN apk add --no-cache gcc musl-dev
# Change vscode default shell to zsh.
RUN sed -i 's/\/home\/vscode:\/bin\/bash/\/home\/vscode:\/bin\/zsh/' /etc/passwd
USER vscode