Skip to content
Permalink
Browse files

Add DevContainer SSH/Git/GPG support. (#3)

  • Loading branch information...
theomessin committed Aug 12, 2019
1 parent 41146f8 commit aea55b2dcbc84cce6c34a70827b847b8d4c89f94
Showing with 12 additions and 17 deletions.
  1. +2 −16 .devcontainer/Dockerfile
  2. +10 −1 .devcontainer/devcontainer.json
@@ -10,24 +10,10 @@ ENV DEBIAN_FRONTEND=noninteractive

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git and needed tools are installed
&& apt-get install -y git procps \
#
# Remove outdated yarn from /opt and install via package
# so it can be easily updated via apt-get upgrade yarn
&& rm -rf /opt/yarn-* \
&& rm -f /usr/local/bin/yarn \
&& rm -f /usr/local/bin/yarnpkg \
&& apt-get install -y curl apt-transport-https lsb-release \
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends yarn \
#
# Install eslint globally
&& npm install -g eslint \
&& apt-get install -y curl git gnupg2 procps lsb-release \
#
# Clean up
&& apt-get autoremove -y \
@@ -14,5 +14,14 @@

"extensions": [
"dbaeumer.vscode-eslint"
]
],

"runArgs": [
// Mount SSH
"-v", "${env:HOME}${env:USERPROFILE}/.ssh:/root/.ssh:ro",
// Mount GPG
"-v", "${env:HOME}${env:USERPROFILE}/.gnupg:/root/.gnupg:ro",
// Mount git --global config
"-v", "${env:HOME}${env:USERPROFILE}/.gitconfig:/root/.gitconfig:ro",
],
}

0 comments on commit aea55b2

Please sign in to comment.
You can’t perform that action at this time.