mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Use Microsoft devcontainer base (#16407)
This commit is contained in:
parent
09759662a1
commit
d703d0a94f
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "home-assistant.io",
|
||||
"dockerFile": "Dockerfile",
|
||||
"dockerFile": "../Dockerfile",
|
||||
"appPort": [4000],
|
||||
"postCreateCommand": "bundle install",
|
||||
"postCreateCommand": "bundle install && npm install",
|
||||
"extensions": [
|
||||
"davidanson.vscode-markdownlint",
|
||||
"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
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Use Bash as the default shell
|
||||
ENV SHELL=/bin/bash
|
||||
# Install node
|
||||
COPY .nvmrc /tmp/.nvmrc
|
||||
RUN \
|
||||
su vscode -c \
|
||||
"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
|
||||
ENV DEVCONTAINER=true
|
||||
@ -16,7 +17,7 @@ ENV \
|
||||
LC_ALL=en_US.UTF-8
|
||||
|
||||
# Install git, process tools
|
||||
RUN apt update \
|
||||
RUN apt update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ack \
|
||||
git \
|
||||
@ -30,7 +31,5 @@ RUN apt update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install the specific version of bundler we need
|
||||
RUN gem install bundler -v 2.0.1
|
||||
|
||||
# Switch back to dialog for any ad-hoc use of apt-get
|
||||
ENV DEBIAN_FRONTEND=dialog
|
||||
COPY 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