Fix Dockerfile for devcontainer (#17447)

This commit is contained in:
Jan Bouwhuis 2021-04-13 23:04:40 +02:00 committed by GitHub
parent 63df6b8c28
commit 4ae7b8eac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -1,7 +1,13 @@
{ {
"name": "home-assistant.io", "name": "home-assistant.io",
"build": {
"dockerfile": "../Dockerfile",
"context": "..", "context": "..",
"dockerFile": "../Dockerfile", "args": {
"VARIANT": "2.6",
"NODE_VERSION": "12.1",
}
},
"appPort": [4000], "appPort": [4000],
"postCreateCommand": "bundle install && npm install", "postCreateCommand": "bundle install && npm install",
"containerEnv": {"DEVCONTAINER": "true"}, "containerEnv": {"DEVCONTAINER": "true"},

View File

@ -1,11 +1,8 @@
ARG VARIANT=2.6 ARG VARIANT=2
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT} FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
# Install node ARG NODE_VERSION="lts/*"
COPY .nvmrc /tmp/.nvmrc RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
RUN \
su vscode -c \
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"
# Locale env vars # Locale env vars
ENV \ ENV \
@ -19,10 +16,7 @@ RUN \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ack \ ack \
&& echo "en_US UTF-8" > /etc/locale.gen \ && echo "en_US UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \ && locale-gen en_US.UTF-8
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Install the specific version of bundler we need # Install the specific version of bundler we need
COPY Gemfile.lock ./ COPY Gemfile.lock ./