mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Use Microsoft devcontainer base (#16407)
This commit is contained in:
parent
09759662a1
commit
d703d0a94f
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "home-assistant.io",
|
"name": "home-assistant.io",
|
||||||
"dockerFile": "Dockerfile",
|
"dockerFile": "../Dockerfile",
|
||||||
"appPort": [4000],
|
"appPort": [4000],
|
||||||
"postCreateCommand": "bundle install",
|
"postCreateCommand": "bundle install && npm install",
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"davidanson.vscode-markdownlint",
|
"davidanson.vscode-markdownlint",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
FROM ruby:2.6
|
ARG VARIANT=2.6
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
||||||
|
|
||||||
# Avoid warnings by switching to noninteractive
|
# Install node
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
COPY .nvmrc /tmp/.nvmrc
|
||||||
|
RUN \
|
||||||
# Use Bash as the default shell
|
su vscode -c \
|
||||||
ENV SHELL=/bin/bash
|
"source /usr/local/share/nvm/nvm.sh && nvm install $(cat /tmp/.nvmrc) 2>&1"
|
||||||
|
|
||||||
# Set an environment variable to be able to detect we are in dev container
|
# Set an environment variable to be able to detect we are in dev container
|
||||||
ENV DEVCONTAINER=true
|
ENV DEVCONTAINER=true
|
||||||
@ -16,7 +17,7 @@ ENV \
|
|||||||
LC_ALL=en_US.UTF-8
|
LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# Install git, process tools
|
# Install git, process tools
|
||||||
RUN apt update \
|
RUN apt update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ack \
|
ack \
|
||||||
git \
|
git \
|
||||||
@ -30,7 +31,5 @@ RUN apt update \
|
|||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install the specific version of bundler we need
|
# Install the specific version of bundler we need
|
||||||
RUN gem install bundler -v 2.0.1
|
COPY Gemfile.lock ./
|
||||||
|
RUN gem install bundler -v `awk 'c&&c--;/BUNDLED WITH/{c=1}' Gemfile.lock`
|
||||||
# Switch back to dialog for any ad-hoc use of apt-get
|
|
||||||
ENV DEBIAN_FRONTEND=dialog
|
|
Loading…
x
Reference in New Issue
Block a user