-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
Milestone
Description
Refs: #72
- windows @connor4312
- anyOS @bpasero
Complexity: 3
- Install GPG locally (E.g., GPGTools for Mac, Gpg4win for Windows).
- Note that one pitfall can be that an already running VS Code might not have the new install on its PATH yet. Restart VS Code to be sure.
- List existing keys:
gpg --list-secret-keys --keyid-format LONG
- Generate a new key if you don't have one already:
gpg --gen-key
- Test installation locally:
- Test file:
echo test > test.txt
- Sign:
gpg --output test.sig --detach-sig test.txt
- Verify:
gpg --verify test.sig test.txt
- Test file:
- Create
Dockerfile
in empty folder:
FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-3.10
RUN apk update \
&& apk add --no-cache gnupg
- Open folder and run
Remote-Containers: Reopen in Container
command.- Pick
From 'Dockerfile'
in configuration picker.
- Pick
- Check the socket and two files are in the container:
ls ~/.gnupg
should showS.gpg-agent pubring.kbx trustdb.gpg
- Repeat the above test in the container:
- Test file:
echo test > test.txt
- Sign:
gpg --output test.sig --detach-sig test.txt
- Verify:
gpg --verify test.sig test.txt
- Test file:
If there is time: Repeat with a Debian base image:
- Create
.devcontainer.json
in an empty folder:
{
"image": "node:12",
"remoteUser": "node"
}
- Reopen folder in container.
- Repeat above tests in container.
(Note: Using usernode
becauseroot
in this particular image comes with files in~/.gnupg
and we don't overwrite existing files.)
/fyi @Chuxel In case any of this helps with documentation.