Skip to content

Commit 7e14645

Browse files
committed
[NDR-318] GH cli running in container.
1 parent 6411e40 commit 7e14645

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,28 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
1010
strip-nondeterminism \
1111
uuid-runtime \
1212
parallel \
13-
bc
13+
bc \
14+
curl \
15+
ca-certificates \
16+
gnupg
17+
18+
# Prepare github-cli install
19+
RUN mkdir -p /etc/apt/keyrings \
20+
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
21+
| gpg --dearmor \
22+
| tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
23+
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
24+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] \
25+
https://cli.github.com/packages stable main" \
26+
| tee /etc/apt/sources.list.d/github-cli.list > /dev/null
1427

1528
# Install CLI tools.
1629
RUN apt-get update && apt-get install -y \
1730
vim \
1831
ranger \
1932
tmux \
20-
fzf
33+
fzf \
34+
gh
2135

2236
# Install base neovim
2337
RUN set -eux; \

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
4949
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached",
5050
"source=${localWorkspaceFolder}/.devcontainer/config/nvim,target=/home/vscode/.config/nvim,type=bind",
51-
"source=${env:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached"
51+
"source=${env:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
52+
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind",
53+
"source=${localEnv:NDRI_LOCATION},target=/workspaces/national-document-repository-infrastructure,type=bind,consistency=cached"
5254
],
5355
"postCreateCommand": "HOST_PWD=${localWorkspaceFolder} bash -c '.devcontainer/src/create.sh' ",
5456
"runArgs": [

0 commit comments

Comments
 (0)