Skip to content

Commit

Permalink
Release 1.1.0 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
egonbraun committed Jan 22, 2024
1 parent b3f4871 commit 98ebe2c
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "container-dev-base",
"name": "devcontainer",
"postAttachCommand": "./.devcontainer/hooks/post_attach.sh",
"remoteUser": "dev",

Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/hooks/post_attach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand Down
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export PROJECT_BUILD_DATE="0000-00-00 00:00:00+00:00"
export PROJECT_DOCKER_ORG="mundoalem"
export PROJECT_NAME="dev-base"
export PROJECT_NAME="devcontainer"
8 changes: 4 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[![Release Status](https://github.com/mundoalem/container-dev-base/actions/workflows/pipeline.yml/badge.svg)](https://github.com/mundoalem/container-dev-base/actions/workflows/pipeline.yml)
[![Release Status](https://github.com/mundoalem/devcontainer/actions/workflows/pipeline.yml/badge.svg)](https://github.com/mundoalem/devcontainer/actions/workflows/pipeline.yml)

# Base Development Container
# devcontainer

This project defines a base container image to be used as a development environment inside [Visual Studio Code](https://code.visualstudio.com/)
This project defines a container image to be used as a development environment inside [Visual Studio Code](https://code.visualstudio.com/)
through the [Remote Dev Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.

# Documentation

Please, refer to the repository's [wiki](https://github.com/mundoalem/container-dev-base/wiki) for further information
on how to get started with this project.
Please, refer to the repository's [wiki](https://github.com/mundoalem/devcontainer/wiki) for further information on how
to get started.

# License

[GNU Affero General Public License Version 3](https://github.com/mundoalem/container-dev-base/blob/main/LICENSE)
[GNU Affero General Public License Version 3](https://github.com/mundoalem/devcontainer/blob/main/LICENSE)
85 changes: 62 additions & 23 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand Down Expand Up @@ -90,18 +90,18 @@ ENV VERSION_UBUNTU_NAME="lunar"
#

LABEL org.opencontainers.artifact.created="${PROJECT_BUILD_DATE}"
LABEL org.opencontainers.artifact.description="Base container image to be used as a development environment inside Visual Studio Code"
LABEL org.opencontainers.artifact.description="Container image to be used as a remote development environment in Visual Studio Code"
LABEL org.opencontainers.image.authors="Egon Braun <egon@mundoalem.io>"
LABEL org.opencontainers.image.base.digest="51e70689b125fcc2e800f5efb7ba465dee85ede9da9c268ff5599053c7e52b77"
LABEL org.opencontainers.image.base.digest="4783be26912a96818aa1c9468ea8acb5eff2608697f62deff67048595a613145"
LABEL org.opencontainers.image.base.name="docker.io/library/ubuntu:${VERSION_UBUNTU}"
LABEL org.opencontainers.image.created="${PROJECT_BUILD_DATE}"
LABEL org.opencontainers.image.description="Base container image to be used as a development environment inside Visual Studio Code"
LABEL org.opencontainers.image.documentation="https://hub.docker.com/r/mundoalemio/dev-base"
LABEL org.opencontainers.image.description="Container image to be used as a remote development environment in Visual Studio Code"
LABEL org.opencontainers.image.documentation="https://hub.docker.com/r/mundoalemio/devcontainer"
LABEL org.opencontainers.image.licenses="AGPLv3"
LABEL org.opencontainers.image.revision="${PROJECT_COMMIT}"
LABEL org.opencontainers.image.source="https://github.com/mundoalem/container-dev-base"
LABEL org.opencontainers.image.source="https://github.com/mundoalem/devcontainer"
LABEL org.opencontainers.image.title="dev-base"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/mundoalemio/dev-base"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/mundoalemio/devcontainer"
LABEL org.opencontainers.image.vendor="Mundoalem"
LABEL org.opencontainers.image.version="${PROJECT_VERSION}"

Expand All @@ -118,9 +118,13 @@ SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
RUN export DEBIAN_FRONTEND="noninteractive" \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
binutils-aarch64-linux-gnu \
binutils-aarch64-linux-gnu-dbg \
build-essential \
ca-certificates \
curl \
direnv \
gcc-aarch64-linux-gnu \
git \
git-extras \
gnupg2 \
Expand All @@ -129,18 +133,20 @@ RUN export DEBIAN_FRONTEND="noninteractive" \
lsb-release \
lsd \
make \
pipx \
pkg-config \
python3 \
python3-full \
pipx \
software-properties-common \
ssh \
sudo \
unzip \
vim \
&& apt-get autoremove -y \
&& apt-get clean autoclean -y \
&& rm -r /var/cache/* /var/lib/apt/lists/*


# ----------------------------------------------------------------------------------------------------------------------
# CONFIGURE LOCALISATION
# ----------------------------------------------------------------------------------------------------------------------
Expand All @@ -164,20 +170,17 @@ RUN locale-gen "${DEFAULT_LANG}" \
# ENV
#

ENV VERSION_DOCKER_CLI="24.0.7-1"
ENV VERSION_DOCKER_BUILDX_PLUGIN="0.11.2-1"
ENV VERSION_DOCKER_COMPOSE_PLUGIN="2.21.0-1"
ENV VERSION_DOCKER_SCOUT="1.0.9"
ENV VERSION_DOCKER_CLI="25.0.0-1"
ENV VERSION_DOCKER_BUILDX_PLUGIN="0.12.1-1"
ENV VERSION_DOCKER_COMPOSE_PLUGIN="2.24.1-1"
ENV FILENAME_DOCKER_SUFFIX="ubuntu.${VERSION_UBUNTU}~${VERSION_UBUNTU_NAME}_${TARGETARCH}.deb"
ENV FILENAME_DOCKER_CLI="docker-ce-cli_${VERSION_DOCKER_CLI}~${FILENAME_DOCKER_SUFFIX}"
ENV FILENAME_DOCKER_BUILDX_PLUGIN="docker-buildx-plugin_${VERSION_DOCKER_BUILDX_PLUGIN}~${FILENAME_DOCKER_SUFFIX}"
ENV FILENAME_DOCKER_COMPOSE_PLUGIN="docker-compose-plugin_${VERSION_DOCKER_COMPOSE_PLUGIN}~${FILENAME_DOCKER_SUFFIX}"
ENV FILENAME_DOCKER_SCOUT_PLUGIN="docker-scout_${VERSION_DOCKER_SCOUT}_linux_${TARGETARCH}.tar.gz"
ENV URL_DOCKER_BASE="https://download.docker.com/linux/ubuntu/dists/${VERSION_UBUNTU_NAME}/pool/stable/${TARGETARCH}"
ENV URL_DOCKER_CLI="${URL_DOCKER_BASE}/${FILENAME_DOCKER_CLI}"
ENV URL_DOCKER_BUILDX_PLUGIN="${URL_DOCKER_BASE}/${FILENAME_DOCKER_BUILDX_PLUGIN}"
ENV URL_DOCKER_COMPOSE_PLUGIN="${URL_DOCKER_BASE}/${FILENAME_DOCKER_COMPOSE_PLUGIN}"
ENV URL_DOCKER_SCOUT_PLUGIN="https://github.com/docker/scout-cli/releases/download/v${VERSION_DOCKER_SCOUT}/${FILENAME_DOCKER_SCOUT_PLUGIN}"

#
# INSTALL
Expand All @@ -186,14 +189,11 @@ ENV URL_DOCKER_SCOUT_PLUGIN="https://github.com/docker/scout-cli/releases/downlo
RUN curl -sSL -o "/tmp/${FILENAME_DOCKER_CLI}" "${URL_DOCKER_CLI}" \
&& curl -sSL -o "/tmp/${FILENAME_DOCKER_BUILDX_PLUGIN}" "${URL_DOCKER_BUILDX_PLUGIN}" \
&& curl -sSL -o "/tmp/${FILENAME_DOCKER_COMPOSE_PLUGIN}" "${URL_DOCKER_COMPOSE_PLUGIN}" \
&& curl -sSL -o "/tmp/${FILENAME_DOCKER_SCOUT_PLUGIN}" "${URL_DOCKER_SCOUT_PLUGIN}" \
&& dpkg -i "/tmp/${FILENAME_DOCKER_CLI}" \
&& dpkg -i "/tmp/${FILENAME_DOCKER_BUILDX_PLUGIN}" \
&& dpkg -i "/tmp/${FILENAME_DOCKER_COMPOSE_PLUGIN}" \
&& tar xvf "/tmp/${FILENAME_DOCKER_SCOUT_PLUGIN}" -C /usr/libexec/docker/cli-plugins/ docker-scout \
&& groupadd docker \
&& rm -f "/tmp/"*"${FILENAME_DOCKER_SUFFIX}" \
&& rm -f "/tmp/${FILENAME_DOCKER_SCOUT_PLUGIN}"
&& rm -f "/tmp/"*"${FILENAME_DOCKER_SUFFIX}"

# ----------------------------------------------------------------------------------------------------------------------
# INSTALL HADOLINT
Expand Down Expand Up @@ -285,7 +285,46 @@ ENV HISTFILE="${HOME}/.history/.bash_history"

RUN mkdir -p "${HOME}/.config" \
&& mkdir "${HOME}/.history" \
&& touch "${HOME}/.history/.bash_history"
&& touch "${HOME}/.history/.bash_history" \
&& mkdir -p "${HOME}/.local/bin"

# ----------------------------------------------------------------------------------------------------------------------
# INSTALL GOENV
# ----------------------------------------------------------------------------------------------------------------------

#
# ENV
#

ENV GOENV_ROOT="${HOME}/.goenv"
ENV PATH="${GOENV_ROOT}/bin:${PATH}"

#
# INSTALL
#

RUN git clone https://github.com/go-nv/goenv.git "${HOME}/.goenv" \
&& echo "eval \"\$(goenv init -)\"" >> "${HOME}/.bashrc" \
&& echo "export PATH=\"\$GOPATH/bin:\$GOROOT/bin:\$PATH\"" >> "${HOME}/.bashrc"

# ----------------------------------------------------------------------------------------------------------------------
# INSTALL PYENV
# ----------------------------------------------------------------------------------------------------------------------

#
# ENV
#

ENV PYENV_ROOT="${HOME}/.pyenv"
ENV PATH="${PYENV_ROOT}/bin:$PATH"

#
# INSTALL
#

RUN curl -fsSL https://pyenv.run | bash \
&& echo "eval \"\$(pyenv init --path)\"" >> "${HOME}/.bashrc" \
&& echo "eval \"\$(pyenv virtualenv-init -)\"" >> "${HOME}/.bashrc"

# ----------------------------------------------------------------------------------------------------------------------
# INSTALL TOOLS
Expand All @@ -295,7 +334,7 @@ RUN mkdir -p "${HOME}/.config" \
# ENV
#

ENV VERSION_CHECKOV="2.4.18"
ENV VERSION_CHECKOV="3.1.67"

#
# PYTHON
Expand Down
10 changes: 5 additions & 5 deletions src/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand All @@ -25,7 +25,7 @@
# HADOLINT
#

# This is a container intended to be used to tun tests which might require elevated permissions
# This is a container intended to be used to run tests which might require elevated permissions
# hadolint global ignore=DL3002

#
Expand Down
33 changes: 29 additions & 4 deletions tests/unittest.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# ######################################################################################################################

#
# This file is part of container-dev-base.
# This file is part of devcontainer.
#
# The container-dev-base is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# The devcontainer is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
# General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The container-dev-base is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# The devcontainer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with container-dev-base. If not, see
# You should have received a copy of the GNU Affero General Public License along with devcontainer. If not, see
# <https://www.gnu.org/licenses/>.
#

Expand Down Expand Up @@ -74,6 +74,21 @@
# PACKAGES
# ----------------------------------------------------------------------------------------------------------------------

@test "aarch64-linux-gnu-as is installed" {
run which aarch64-linux-gnu-as
[ "$status" -eq 0 ]
}

@test "aarch64-linux-gnu-ld is installed" {
run which aarch64-linux-gnu-ld
[ "$status" -eq 0 ]
}

@test "aarch64-linux-gnu-objdump is installed" {
run which aarch64-linux-gnu-objdump
[ "$status" -eq 0 ]
}

@test "checkov is installed" {
run which checkov
[ "$status" -eq 0 ]
Expand All @@ -99,6 +114,11 @@
[ "$status" -eq 0 ]
}

@test "goenv is installed" {
run which goenv
[ "$status" -eq 0 ]
}

@test "gpg is installed" {
run which gpg
[ "$status" -eq 0 ]
Expand All @@ -119,6 +139,11 @@
[ "$status" -eq 0 ]
}

@test "pyenv is installed" {
run which pyenv
[ "$status" -eq 0 ]
}

@test "sudo is installed" {
run which sudo
[ "$status" -eq 0 ]
Expand Down

0 comments on commit 98ebe2c

Please sign in to comment.