Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Container: Get 'debian-docker.sh' from github, fix nvm, prune already installed #3524

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

DLehenbauer
Copy link
Contributor

@DLehenbauer DLehenbauer commented Sep 4, 2020

A few more tweaks to our dev container...

  • Get 'debian-docker.sh' from "Docker-from-docker" template
  • Fix NVM (.zshrc was out of date)
  • Prune already installed apt-get packages

@@ -2,17 +2,17 @@
# export PATH=$HOME/bin:/usr/local/bin:$PATH
Copy link
Contributor Author

@DLehenbauer DLehenbauer Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except as noted, all .zshrc changes are due to having used an old version of 'oh-my-zsh'.

if [ "$(stat -c '%U' $NVM_DIR)" != "node" ]; then
sudo chown -R node:root $NVM_DIR
fi
if [ "$(stat -c '%U' /usr/local/share/npm-global)" != "node" ]; then sudo chown -R 1000:root /usr/local/share/npm-global /usr/local/share/nvm; fi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This missing bit is required for NVM

FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${NODE_VERSION}

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

COPY library-scripts/*.sh /tmp/library-scripts/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now get the 'debian-docker.sh' install script from GitHub instead of checking it in.

# https://jilles.me/badassify-your-terminal-and-shell/
# https://billgrant.io/post/2019-05-05-vsremote/
&& apt-get install -y zsh \
wget \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the above has already been done in the base image. We don't need to do it again.

git \
curl \
g++

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also already done in the debian base image. (Uses packages and everything.)

@DLehenbauer DLehenbauer changed the title Dev Container: Dev Container: Get 'debian-docker.sh' from github, fix nvm, prune already installed Sep 4, 2020
@ghost ghost added the triage label Sep 4, 2020
@DLehenbauer
Copy link
Contributor Author

Thanks, @tanviraumi

@DLehenbauer DLehenbauer merged commit a0f9889 into main Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants