mirror of
https://github.com/aljazceru/addons.git
synced 2026-01-22 14:25:44 +01:00
Simplify devcontainer setup (#1687)
* Simplify devcontainer setup * Add stable shellcheck * Fix observer port
This commit is contained in:
@@ -1,47 +1,34 @@
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/base:debian-10
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/base:debian
|
||||
|
||||
WORKDIR /workspaces
|
||||
|
||||
# Default ENV
|
||||
ENV LANG C.UTF-8
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Install docker
|
||||
# https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
software-properties-common \
|
||||
gnupg \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
containerd.io \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Set Docker daemon config
|
||||
RUN \
|
||||
mkdir -p /etc/docker \
|
||||
&& echo '{"storage-driver": "vfs"}' > /etc/docker/daemon.json
|
||||
|
||||
# Install tools
|
||||
ARG SHELLCHECK_VERSION=0.7.0
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
jq \
|
||||
# Installa aditional tools
|
||||
RUN \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
dbus \
|
||||
network-manager \
|
||||
libpulse0 \
|
||||
git \
|
||||
tar \
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
xz-utils
|
||||
|
||||
# Install docker
|
||||
RUN curl -fsSL https://get.docker.com | sh -
|
||||
|
||||
# Install shellcheck
|
||||
RUN \
|
||||
curl -fLs \
|
||||
"https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" \
|
||||
| tar -xJ \
|
||||
\
|
||||
&& curl -SL "https://storage.googleapis.com/shellcheck/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar xJf - \
|
||||
&& cp "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ \
|
||||
&& rm -rf shellcheck-v${SHELLCHECK_VERSION}
|
||||
&& mv -f "./shellcheck-stable/shellcheck" "/usr/bin/shellcheck" \
|
||||
&& rm -rf "./shellcheck-stable"
|
||||
|
||||
# Generate a machine-id for this container
|
||||
RUN rm /etc/machine-id && dbus-uuidgen --ensure=/etc/machine-id
|
||||
|
||||
ENV DEBIAN_FRONTEND=dialog
|
||||
RUN rm /etc/machine-id && dbus-uuidgen --ensure=/etc/machine-id
|
||||
Reference in New Issue
Block a user