Skip to content

Commit

Permalink
Adjust devcontainer (home-assistant#16409)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Feb 4, 2021
1 parent 1486827 commit e88c56e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dockerFile": "../Dockerfile",
"appPort": [4000],
"postCreateCommand": "bundle install && npm install",
"containerEnv": {"DEVCONTAINER": "true"},
"extensions": [
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
Expand All @@ -18,6 +19,6 @@
"errorLens.gutterIconsEnabled": true,
"errorLens.addAnnotationTextPrefixes": false,
"errorLens.enabledDiagnosticLevels": ["error", "warning"],
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.shell.linux": "/usr/bin/zsh",
}
}
26 changes: 10 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,22 @@ 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

# Locale env vars
ENV \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8

# Install git, process tools
RUN apt update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
ack \
git \
locales \
procps \
&& echo "en_US UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& echo 'export PS1="\\w\$ "' > /root/.bashrc \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Install tools
RUN \
apt update \
&& 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/*

# Install the specific version of bundler we need
COPY Gemfile.lock ./
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ group :development do
gem 'compass', '1.0.3'
gem 'sass-globbing', '1.1.5'
gem 'stringex', '2.8.5'
# > 2.1.0 causes slowdowns https://github.com/sass/sassc-ruby/issues/189
gem 'sassc', '2.1.0'
end

group :jekyll_plugins do
Expand Down
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ GEM
sass (3.4.25)
sass-globbing (1.1.5)
sass (>= 3.1)
sassc (2.4.0)
sassc (2.1.0)
ffi (~> 1.9)
sassc (2.4.0-x64-mingw32)
sassc (2.1.0-x64-mingw32)
ffi (~> 1.9)
sinatra (2.1.0)
mustermann (~> 1.0)
Expand Down Expand Up @@ -133,6 +133,7 @@ DEPENDENCIES
nokogiri (= 1.11.1)
rake (= 13.0.3)
sass-globbing (= 1.1.5)
sassc (= 2.1.0)
sinatra (= 2.1.0)
stringex (= 2.8.5)
tzinfo (~> 2.0)
Expand Down

0 comments on commit e88c56e

Please sign in to comment.