Update devcontainer settings (#574)

- Add some packages to help with development (jq, nftables)
- Clean up env locale and install en_US
- Fix init script failure on *nix
- Add some ruby vscode extension
This commit is contained in:
Mark Percival
2022-05-05 08:21:48 -04:00
committed by GitHub
parent 53d8f0803a
commit 7d01b49b98
3 changed files with 16 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ RUN echo "APT::Install-Recommends 0;" >> /etc/apt/apt.conf.d/01norecommends \
wget \
net-tools \
wireguard \
nftables \
inotify-tools \
ca-certificates \
build-essential \
@@ -40,6 +41,8 @@ RUN echo "APT::Install-Recommends 0;" >> /etc/apt/apt.conf.d/01norecommends \
bsdmainutils \
gpg \
dirmngr \
jq \
locales \
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
@@ -55,6 +58,14 @@ RUN echo "APT::Install-Recommends 0;" >> /etc/apt/apt.conf.d/01norecommends \
&& mkdir -p /workspace \
&& chown -R $USERNAME /workspace
# Set the locale to en_US.UTF-8 and TZ to UTC
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV TZ 'UTC'
ENV DEBIAN_FRONTEND=dialog
FROM dev-base AS setup-asdf
@@ -74,8 +85,6 @@ ARG USERNAME=vscode
USER $USERNAME
WORKDIR /home/$USERNAME
ENV HOME=/home/$USERNAME \
TZ="UTC" \
LC_ALL="C.UTF-8" \
ASDF_DIR="/opt/asdf" \
ASDF_DATA_DIR="/opt/asdf-data"
@@ -104,6 +113,7 @@ VOLUME ["${ASDF_DATA_DIR}"]
# Pre-commit install with deps
RUN pip install setuptools wheel
RUN pip install pre-commit
RUN gem install rubocop
ENV PATH=${HOME}/.local/bin:/opt/asdf-data/shims:/opt/asdf/bin:${PATH}

View File

@@ -14,7 +14,8 @@
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"jakebecker.elixir-ls",
"phoenixframework.phoenix"
"phoenixframework.phoenix",
"rebornix.ruby"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.

2
.devcontainer/init.sh → .devcontainer/init Normal file → Executable file
View File

@@ -1 +1,3 @@
#!/bin/sh
cp .tool-versions .devcontainer/.tool-versions