mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Fix Dockerfile for devcontainer (#17447)
This commit is contained in:
parent
63df6b8c28
commit
4ae7b8eac8
@ -1,7 +1,13 @@
|
||||
{
|
||||
"name": "home-assistant.io",
|
||||
"context": "..",
|
||||
"dockerFile": "../Dockerfile",
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"context": "..",
|
||||
"args": {
|
||||
"VARIANT": "2.6",
|
||||
"NODE_VERSION": "12.1",
|
||||
}
|
||||
},
|
||||
"appPort": [4000],
|
||||
"postCreateCommand": "bundle install && npm install",
|
||||
"containerEnv": {"DEVCONTAINER": "true"},
|
||||
@ -21,4 +27,4 @@
|
||||
"errorLens.enabledDiagnosticLevels": ["error", "warning"],
|
||||
"terminal.integrated.shell.linux": "/usr/bin/zsh",
|
||||
}
|
||||
}
|
||||
}
|
16
Dockerfile
16
Dockerfile
@ -1,11 +1,8 @@
|
||||
ARG VARIANT=2.6
|
||||
ARG VARIANT=2
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
||||
|
||||
# Install node
|
||||
COPY .nvmrc /tmp/.nvmrc
|
||||
RUN \
|
||||
su vscode -c \
|
||||
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"
|
||||
ARG NODE_VERSION="lts/*"
|
||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
||||
|
||||
# Locale env vars
|
||||
ENV \
|
||||
@ -19,11 +16,8 @@ RUN \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
ack \
|
||||
&& echo "en_US UTF-8" > /etc/locale.gen \
|
||||
&& locale-gen en_US.UTF-8 \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& locale-gen en_US.UTF-8
|
||||
|
||||
# Install the specific version of bundler we need
|
||||
COPY Gemfile.lock ./
|
||||
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`
|
||||
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`
|
Loading…
x
Reference in New Issue
Block a user