Skip to content

Test: GPG forwarding #3053

@chrmarti

Description

@chrmarti

Refs: #72

Complexity: 3

Create Issue


  • 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
  • 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.
  • Check the socket and two files are in the container: ls ~/.gnupg should show S.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

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 user node because root 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions