From 7d01b49b98c9be4dc3ce12ba543071f52d9c8a79 Mon Sep 17 00:00:00 2001 From: Mark Percival Date: Thu, 5 May 2022 08:21:48 -0400 Subject: [PATCH] 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 --- .devcontainer/Dockerfile | 14 ++++++++++++-- .devcontainer/devcontainer.json | 3 ++- .devcontainer/{init.sh => init} | 2 ++ 3 files changed, 16 insertions(+), 3 deletions(-) rename .devcontainer/{init.sh => init} (81%) mode change 100644 => 100755 diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9d7457811..915aba54e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e92a2e878..eb5b2c1c8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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. diff --git a/.devcontainer/init.sh b/.devcontainer/init old mode 100644 new mode 100755 similarity index 81% rename from .devcontainer/init.sh rename to .devcontainer/init index 816c061c5..6e78b1eb1 --- a/.devcontainer/init.sh +++ b/.devcontainer/init @@ -1 +1,3 @@ +#!/bin/sh + cp .tool-versions .devcontainer/.tool-versions