Ensure remove apt-update cache at the beginning and end of the scripts (#210)
* remove apt lists * bump versions
This commit is contained in:
parent
065b5ec9e1
commit
a8cb375d46
52 changed files with 352 additions and 130 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "anaconda",
|
"id": "anaconda",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"name": "Anaconda",
|
"name": "Anaconda",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/anaconda",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/anaconda",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
|
@ -16,6 +16,9 @@ CONDA_DIR=${CONDA_DIR:-"/usr/local/conda"}
|
||||||
set -eux
|
set -eux
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -64,7 +67,10 @@ updaterc() {
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -128,4 +134,7 @@ if [ -f "/etc/bash.bashrc" ]; then
|
||||||
echo "${notice_script}" | tee -a /etc/bash.bashrc
|
echo "${notice_script}" | tee -a /etc/bash.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "aws-cli",
|
"id": "aws-cli",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "AWS CLI",
|
"name": "AWS CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/aws-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/aws-cli",
|
||||||
"description": "Installs the AWS CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs the AWS CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
VERSION=${VERSION:-"latest"}
|
VERSION=${VERSION:-"latest"}
|
||||||
|
|
||||||
AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C
|
AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C
|
||||||
|
@ -71,7 +74,10 @@ apt_get_update()
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
apt_get_update
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
|
apt-get update -y
|
||||||
|
fi
|
||||||
apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -133,4 +139,7 @@ echo "(*) Installing AWS CLI..."
|
||||||
|
|
||||||
install
|
install
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "azure-cli",
|
"id": "azure-cli",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Azure CLI",
|
"name": "Azure CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
|
||||||
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
AZ_VERSION=${VERSION:-"latest"}
|
AZ_VERSION=${VERSION:-"latest"}
|
||||||
|
|
||||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||||
|
@ -44,7 +47,10 @@ apt_get_update()
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
apt_get_update
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
|
apt-get update -y
|
||||||
|
fi
|
||||||
apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -179,4 +185,7 @@ if [ "${use_pip}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "common-utils",
|
"id": "common-utils",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"name": "Common Debian Utilities",
|
"name": "Common Debian Utilities",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
||||||
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
INSTALL_ZSH=${INSTALLZSH:-"true"}
|
INSTALL_ZSH=${INSTALLZSH:-"true"}
|
||||||
INSTALL_OH_MY_ZSH=${INSTALLOHMYZSH:-"true"}
|
INSTALL_OH_MY_ZSH=${INSTALLOHMYZSH:-"true"}
|
||||||
UPGRADE_PACKAGES=${UPGRADEPACKAGES:-"true"}
|
UPGRADE_PACKAGES=${UPGRADEPACKAGES:-"true"}
|
||||||
|
@ -60,8 +63,10 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
|
# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
|
||||||
|
@ -447,4 +452,7 @@ echo -e "\
|
||||||
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
|
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
|
||||||
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
|
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "conda",
|
"id": "conda",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Conda",
|
"name": "Conda",
|
||||||
"description": "A cross-platform, language-agnostic binary package manager",
|
"description": "A cross-platform, language-agnostic binary package manager",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",
|
||||||
|
|
|
@ -14,6 +14,9 @@ CONDA_DIR="/opt/conda"
|
||||||
set -eux
|
set -eux
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -50,12 +53,11 @@ fi
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
|
|
||||||
# Clean up
|
|
||||||
apt-get clean -y
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +75,7 @@ if ! conda --version &> /dev/null ; then
|
||||||
|
|
||||||
curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg
|
curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list
|
||||||
|
apt-get update -y
|
||||||
|
|
||||||
CONDA_PKG="conda=${VERSION}-0"
|
CONDA_PKG="conda=${VERSION}-0"
|
||||||
if [ "${VERSION}" = "latest" ]; then
|
if [ "${VERSION}" = "latest" ]; then
|
||||||
|
@ -123,4 +126,7 @@ if [ -f "/etc/bash.bashrc" ]; then
|
||||||
echo "${notice_script}" | tee -a /etc/bash.bashrc
|
echo "${notice_script}" | tee -a /etc/bash.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "desktop-lite",
|
"id": "desktop-lite",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Light-weight Desktop",
|
"name": "Light-weight Desktop",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite",
|
||||||
"description": "Adds a lightweight Fluxbox based desktop to the container that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS code terminal will open on the desktop automatically.",
|
"description": "Adds a lightweight Fluxbox based desktop to the container that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS code terminal will open on the desktop automatically.",
|
||||||
|
|
|
@ -63,6 +63,9 @@ package_list_additional="
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -151,8 +154,10 @@ copy_fluxbox_config() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -176,7 +181,7 @@ apt_get_update
|
||||||
if [[ -z $(apt-cache --names-only search ^tilix$) ]]; then
|
if [[ -z $(apt-cache --names-only search ^tilix$) ]]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [ "${ID}" = "ubuntu" ]; then
|
if [ "${ID}" = "ubuntu" ]; then
|
||||||
apt-get install -y --no-install-recommends apt-transport-https software-properties-common
|
check_packages apt-transport-https software-properties-common
|
||||||
add-apt-repository -y ppa:webupd8team/terminix
|
add-apt-repository -y ppa:webupd8team/terminix
|
||||||
elif [ "${VERSION_CODENAME}" = "stretch" ]; then
|
elif [ "${VERSION_CODENAME}" = "stretch" ]; then
|
||||||
echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list
|
echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list
|
||||||
|
@ -232,9 +237,7 @@ if [ "${INSTALL_NOVNC}" = "true" ] && [ ! -d "/usr/local/novnc" ]; then
|
||||||
rm -f /tmp/websockify-install.zip /tmp/novnc-install.zip
|
rm -f /tmp/websockify-install.zip /tmp/novnc-install.zip
|
||||||
|
|
||||||
# Install noVNC dependencies and use them.
|
# Install noVNC dependencies and use them.
|
||||||
if ! dpkg -s python3-minimal python3-numpy > /dev/null 2>&1; then
|
check_packages python3-minimal python3-numpy
|
||||||
apt-get -y install --no-install-recommends python3-minimal python3-numpy
|
|
||||||
fi
|
|
||||||
sed -i -E 's/^python /python3 /' /usr/local/novnc/websockify-${WEBSOCKETIFY_VERSION}/run
|
sed -i -E 's/^python /python3 /' /usr/local/novnc/websockify-${WEBSOCKETIFY_VERSION}/run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -387,6 +390,9 @@ if [ "${USERNAME}" != "root" ]; then
|
||||||
chown -R ${USERNAME} /home/${USERNAME}/.Xmodmap /home/${USERNAME}/.fluxbox
|
chown -R ${USERNAME} /home/${USERNAME}/.Xmodmap /home/${USERNAME}/.fluxbox
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "docker-from-docker",
|
"id": "docker-from-docker",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"name": "Docker (Docker-from-Docker)",
|
"name": "Docker (Docker-from-Docker)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-from-docker",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-from-docker",
|
||||||
"descripton": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",
|
"descripton": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",
|
||||||
|
|
|
@ -22,6 +22,9 @@ DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -61,8 +64,10 @@ get_common_setting() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -113,8 +118,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
check_packages apt-transport-https curl ca-certificates gnupg2 dirmngr
|
check_packages apt-transport-https curl ca-certificates gnupg2 dirmngr
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source /etc/os-release to get OS info
|
# Source /etc/os-release to get OS info
|
||||||
|
@ -206,10 +210,7 @@ else
|
||||||
fi
|
fi
|
||||||
if [ "${TARGET_COMPOSE_ARCH}" != "x86_64" ]; then
|
if [ "${TARGET_COMPOSE_ARCH}" != "x86_64" ]; then
|
||||||
# Use pip to get a version that runns on this architecture
|
# Use pip to get a version that runns on this architecture
|
||||||
if ! dpkg -s python3-minimal python3-pip libffi-dev python3-venv > /dev/null 2>&1; then
|
check_packages python3-minimal python3-pip libffi-dev python3-venv
|
||||||
apt_get_update
|
|
||||||
apt-get -y install python3-minimal python3-pip libffi-dev python3-venv
|
|
||||||
fi
|
|
||||||
export PIPX_HOME=/usr/local/pipx
|
export PIPX_HOME=/usr/local/pipx
|
||||||
mkdir -p ${PIPX_HOME}
|
mkdir -p ${PIPX_HOME}
|
||||||
export PIPX_BIN_DIR=/usr/local/bin
|
export PIPX_BIN_DIR=/usr/local/bin
|
||||||
|
@ -255,6 +256,8 @@ fi
|
||||||
|
|
||||||
# If init file already exists, exit
|
# If init file already exists, exit
|
||||||
if [ -f "/usr/local/share/docker-init.sh" ]; then
|
if [ -f "/usr/local/share/docker-init.sh" ]; then
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "docker-init doesnt exist, adding..."
|
echo "docker-init doesnt exist, adding..."
|
||||||
|
@ -269,6 +272,8 @@ fi
|
||||||
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
|
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
|
||||||
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
|
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
|
||||||
chmod +x /usr/local/share/docker-init.sh
|
chmod +x /usr/local/share/docker-init.sh
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -281,10 +286,7 @@ DOCKER_GID="$(grep -oP '^docker:x:\K[^:]+' /etc/group)"
|
||||||
|
|
||||||
# If enabling non-root access and specified user is found, setup socat and add script
|
# If enabling non-root access and specified user is found, setup socat and add script
|
||||||
chown -h "${USERNAME}":root "${TARGET_SOCKET}"
|
chown -h "${USERNAME}":root "${TARGET_SOCKET}"
|
||||||
if ! dpkg -s socat > /dev/null 2>&1; then
|
check_packages socat
|
||||||
apt_get_update
|
|
||||||
apt-get -y install socat
|
|
||||||
fi
|
|
||||||
tee /usr/local/share/docker-init.sh > /dev/null \
|
tee /usr/local/share/docker-init.sh > /dev/null \
|
||||||
<< EOF
|
<< EOF
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
@ -346,4 +348,8 @@ exec "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x /usr/local/share/docker-init.sh
|
chmod +x /usr/local/share/docker-init.sh
|
||||||
chown ${USERNAME}:root /usr/local/share/docker-init.sh
|
chown ${USERNAME}:root /usr/local/share/docker-init.sh
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "docker-in-docker",
|
"id": "docker-in-docker",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"name": "Docker (Docker-in-Docker)",
|
"name": "Docker (Docker-in-Docker)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
|
||||||
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
|
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
|
||||||
|
|
|
@ -23,6 +23,9 @@ DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute
|
||||||
# Default: Exit on any failure.
|
# Default: Exit on any failure.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Setup STDERR.
|
# Setup STDERR.
|
||||||
err() {
|
err() {
|
||||||
echo "(!) $*" >&2
|
echo "(!) $*" >&2
|
||||||
|
@ -72,8 +75,10 @@ get_common_setting() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -154,8 +159,7 @@ fi
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
check_packages apt-transport-https curl ca-certificates pigz iptables gnupg2 dirmngr
|
check_packages apt-transport-https curl ca-certificates pigz iptables gnupg2 dirmngr
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Swap to legacy iptables for compatibility
|
# Swap to legacy iptables for compatibility
|
||||||
|
@ -249,10 +253,7 @@ else
|
||||||
fi
|
fi
|
||||||
if [ "${target_compose_arch}" != "x86_64" ]; then
|
if [ "${target_compose_arch}" != "x86_64" ]; then
|
||||||
# Use pip to get a version that runs on this architecture
|
# Use pip to get a version that runs on this architecture
|
||||||
if ! dpkg -s python3-minimal python3-pip libffi-dev python3-venv > /dev/null 2>&1; then
|
check_packages python3-minimal python3-pip libffi-dev python3-venv
|
||||||
apt_get_update
|
|
||||||
apt-get -y install python3-minimal python3-pip libffi-dev python3-venv
|
|
||||||
fi
|
|
||||||
export PIPX_HOME=/usr/local/pipx
|
export PIPX_HOME=/usr/local/pipx
|
||||||
mkdir -p ${PIPX_HOME}
|
mkdir -p ${PIPX_HOME}
|
||||||
export PIPX_BIN_DIR=/usr/local/bin
|
export PIPX_BIN_DIR=/usr/local/bin
|
||||||
|
@ -299,6 +300,8 @@ fi
|
||||||
# If init file already exists, exit
|
# If init file already exists, exit
|
||||||
if [ -f "/usr/local/share/docker-init.sh" ]; then
|
if [ -f "/usr/local/share/docker-init.sh" ]; then
|
||||||
echo "/usr/local/share/docker-init.sh already exists, so exiting."
|
echo "/usr/local/share/docker-init.sh already exists, so exiting."
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "docker-init doesnt exist, adding..."
|
echo "docker-init doesnt exist, adding..."
|
||||||
|
@ -398,4 +401,7 @@ EOF
|
||||||
chmod +x /usr/local/share/docker-init.sh
|
chmod +x /usr/local/share/docker-init.sh
|
||||||
chown ${USERNAME}:root /usr/local/share/docker-init.sh
|
chown ${USERNAME}:root /usr/local/share/docker-init.sh
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo 'docker-in-docker-debian script has completed!'
|
echo 'docker-in-docker-debian script has completed!'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "dotnet",
|
"id": "dotnet",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "Dotnet CLI",
|
"name": "Dotnet CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
|
||||||
"description": "Installs the .NET CLI. Provides option of installing sdk or runtime, and option of versions to install. Uses latest version of .NET sdk as defaults to install.",
|
"description": "Installs the .NET CLI. Provides option of installing sdk or runtime, and option of versions to install. Uses latest version of .NET sdk as defaults to install.",
|
||||||
|
|
|
@ -30,6 +30,11 @@ DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1="buster bullseye bionic focal hi
|
||||||
# alongside DOTNET_VERSION, but not set as default.
|
# alongside DOTNET_VERSION, but not set as default.
|
||||||
ADDITIONAL_VERSIONS=${ADDITIONALVERSIONS:-""}
|
ADDITIONAL_VERSIONS=${ADDITIONALVERSIONS:-""}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Setup STDERR.
|
# Setup STDERR.
|
||||||
err() {
|
err() {
|
||||||
echo "(!) $*" >&2
|
echo "(!) $*" >&2
|
||||||
|
@ -109,8 +114,10 @@ updaterc() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if packages are installed and installs them if not.
|
# Check if packages are installed and installs them if not.
|
||||||
|
@ -463,4 +470,7 @@ if [ "${CHANGE_OWNERSHIP}" = "true" ]; then
|
||||||
find "${TARGET_DOTNET_ROOT}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${TARGET_DOTNET_ROOT}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git-lfs",
|
"id": "git-lfs",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"name": "Git Large File Support (LFS)",
|
"name": "Git Large File Support (LFS)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git-lfs",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git-lfs",
|
||||||
"description": "Installs Git Large File Support (Git LFS) along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like git and curl.",
|
"description": "Installs Git Large File Support (Git LFS) along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like git and curl.",
|
||||||
|
|
|
@ -19,6 +19,9 @@ keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -107,8 +110,10 @@ receive_gpg_keys() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -178,8 +183,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
check_packages curl ca-certificates gnupg2 dirmngr apt-transport-https
|
check_packages curl ca-certificates gnupg2 dirmngr apt-transport-https
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
if [ "${ID}" = "debian" ]; then
|
if [ "${ID}" = "debian" ]; then
|
||||||
check_packages debian-archive-keyring
|
check_packages debian-archive-keyring
|
||||||
|
@ -199,4 +203,7 @@ if [ "${use_github}" = "true" ]; then
|
||||||
install_using_github
|
install_using_github
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git",
|
"id": "git",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Git (from source)",
|
"name": "Git (from source)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
|
||||||
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",
|
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",
|
||||||
|
|
|
@ -17,6 +17,9 @@ keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -76,8 +79,10 @@ receive_gpg_keys() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -97,11 +102,15 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
if [ ${GIT_VERSION} = "os-provided" ] || [ ${GIT_VERSION} = "system" ]; then
|
if [ ${GIT_VERSION} = "os-provided" ] || [ ${GIT_VERSION} = "system" ]; then
|
||||||
if type git > /dev/null 2>&1; then
|
if type git > /dev/null 2>&1; then
|
||||||
echo "Detected existing system install: $(git version)"
|
echo "Detected existing system install: $(git version)"
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing git from OS apt repository"
|
echo "Installing git from OS apt repository"
|
||||||
check_packages git
|
check_packages git
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -114,6 +123,7 @@ if ([ "${GIT_VERSION}" = "latest" ] || [ "${GIT_VERSION}" = "lts" ] || [ "${GIT_
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install --no-install-recommends git
|
apt-get -y install --no-install-recommends git
|
||||||
rm -rf "/tmp/tmp-gnupg"
|
rm -rf "/tmp/tmp-gnupg"
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -143,4 +153,5 @@ echo "Building..."
|
||||||
cd /tmp/git-${GIT_VERSION}
|
cd /tmp/git-${GIT_VERSION}
|
||||||
make -s prefix=/usr/local all && make -s prefix=/usr/local install 2>&1
|
make -s prefix=/usr/local all && make -s prefix=/usr/local install 2>&1
|
||||||
rm -rf /tmp/git-${GIT_VERSION}
|
rm -rf /tmp/git-${GIT_VERSION}
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "github-cli",
|
"id": "github-cli",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"name": "GitHub CLI",
|
"name": "GitHub CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/github-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/github-cli",
|
||||||
"description": "Installs the GitHub CLI. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs the GitHub CLI. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -17,6 +17,9 @@ keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -141,8 +144,10 @@ receive_gpg_keys() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -209,8 +214,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Install curl, apt-transport-https, curl, gpg, or dirmngr, git if missing
|
# Install curl, apt-transport-https, curl, gpg, or dirmngr, git if missing
|
||||||
check_packages curl ca-certificates apt-transport-https dirmngr gnupg2
|
check_packages curl ca-certificates apt-transport-https dirmngr gnupg2
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Soft version matching
|
# Soft version matching
|
||||||
|
@ -236,3 +240,6 @@ else
|
||||||
rm -rf "/tmp/gh/gnupg"
|
rm -rf "/tmp/gh/gnupg"
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "go",
|
"id": "go",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"name": "Go",
|
"name": "Go",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/go",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/go",
|
||||||
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -19,6 +19,9 @@ GO_GPG_KEY_URI="https://dl.google.com/linux/linux_signing_key.pub"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -97,8 +100,10 @@ get_common_setting() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -114,8 +119,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Install curl, tar, git, other dependencies if missing
|
# Install curl, tar, git, other dependencies if missing
|
||||||
check_packages curl ca-certificates gnupg2 tar g++ gcc libc6-dev make pkg-config
|
check_packages curl ca-certificates gnupg2 tar g++ gcc libc6-dev make pkg-config
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get closest match for version number specified
|
# Get closest match for version number specified
|
||||||
|
@ -225,4 +229,7 @@ chmod -R g+r+w "${TARGET_GOROOT}" "${TARGET_GOPATH}"
|
||||||
find "${TARGET_GOROOT}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${TARGET_GOROOT}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
find "${TARGET_GOPATH}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${TARGET_GOPATH}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "hugo",
|
"id": "hugo",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"name": "Hugo",
|
"name": "Hugo",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/hugo",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/hugo",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
|
@ -16,6 +16,9 @@ HUGO_DIR=${HUGO_DIR:-"/usr/local/hugo"}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -63,8 +66,10 @@ updaterc() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -114,4 +119,7 @@ if ! hugo version &> /dev/null ; then
|
||||||
find "${HUGO_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${HUGO_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "java",
|
"id": "java",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"name": "Java (via SDKMAN!)",
|
"name": "Java (via SDKMAN!)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/java",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/java",
|
||||||
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",
|
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",
|
||||||
|
|
|
@ -24,6 +24,9 @@ ADDITIONAL_VERSIONS=${ADDITIONALVERSIONS:-""}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -65,8 +68,10 @@ updaterc() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -176,4 +181,7 @@ if [[ "${INSTALL_MAVEN}" = "true" ]] && ! mvn --version > /dev/null; then
|
||||||
sdk_install maven latest
|
sdk_install maven latest
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "kubectl-helm-minikube",
|
"id": "kubectl-helm-minikube",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Kubectl, Helm, and Minkube",
|
"name": "Kubectl, Helm, and Minkube",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
|
||||||
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
|
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
KUBECTL_VERSION="${VERSION:-"latest"}"
|
KUBECTL_VERSION="${VERSION:-"latest"}"
|
||||||
HELM_VERSION="${HELM:-"latest"}"
|
HELM_VERSION="${HELM:-"latest"}"
|
||||||
MINIKUBE_VERSION="${MINIKUBE:-"none"}" # latest is also valid
|
MINIKUBE_VERSION="${MINIKUBE:-"none"}" # latest is also valid
|
||||||
|
@ -102,8 +105,10 @@ find_version_from_git_tags() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -120,8 +125,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
check_packages curl ca-certificates coreutils gnupg2 dirmngr bash-completion
|
check_packages curl ca-certificates coreutils gnupg2 dirmngr bash-completion
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
architecture="$(uname -m)"
|
architecture="$(uname -m)"
|
||||||
|
@ -240,4 +244,7 @@ if ! type docker > /dev/null 2>&1; then
|
||||||
echo -e '\n(*) Warning: The docker command was not found.\n\nYou can use one of the following scripts to install it:\n\nhttps://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md\n\nor\n\nhttps://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md'
|
echo -e '\n(*) Warning: The docker command was not found.\n\nYou can use one of the following scripts to install it:\n\nhttps://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md\n\nor\n\nhttps://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo -e "\nDone!"
|
echo -e "\nDone!"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "node",
|
"id": "node",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "Node.js (via nvm) and yarn",
|
"name": "Node.js (via nvm) and yarn",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
|
||||||
"description": "Installs Node.js, nvm, yarn, and needed dependencies.",
|
"description": "Installs Node.js, nvm, yarn, and needed dependencies.",
|
||||||
|
|
|
@ -22,6 +22,9 @@ export NVM_VERSION="0.38.0"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -62,8 +65,10 @@ updaterc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
apt_get_update() {
|
apt_get_update() {
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -109,6 +114,8 @@ if [ -d "${NVM_DIR}" ]; then
|
||||||
if [ "${NODE_VERSION}" != "" ]; then
|
if [ "${NODE_VERSION}" != "" ]; then
|
||||||
su ${USERNAME} -c ". $NVM_DIR/nvm.sh && nvm install ${NODE_VERSION} && nvm clear-cache"
|
su ${USERNAME} -c ". $NVM_DIR/nvm.sh && nvm install ${NODE_VERSION} && nvm clear-cache"
|
||||||
fi
|
fi
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -187,4 +194,7 @@ fi
|
||||||
|
|
||||||
find "${NVM_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${NVM_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "nvidia-cuda",
|
"id": "nvidia-cuda",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"name": "NVIDIA CUDA",
|
"name": "NVIDIA CUDA",
|
||||||
"description": "Installs shared libraries for NVIDIA CUDA.",
|
"description": "Installs shared libraries for NVIDIA CUDA.",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/nvidia-cuda",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/nvidia-cuda",
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
INSTALL_CUDNN=${INSTALLCUDNN}
|
INSTALL_CUDNN=${INSTALLCUDNN}
|
||||||
INSTALL_NVTX=${INSTALLNVTX}
|
INSTALL_NVTX=${INSTALLNVTX}
|
||||||
CUDA_VERSION=${CUDAVERSION}
|
CUDA_VERSION=${CUDAVERSION}
|
||||||
|
@ -12,9 +15,23 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install dependencies
|
apt_get_update()
|
||||||
apt-get update -yq
|
{
|
||||||
apt-get install -yq wget ca-certificates
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
|
apt-get update -y
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if packages are installed and installs them if not
|
||||||
|
check_packages() {
|
||||||
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
|
apt_get_update
|
||||||
|
apt-get -y install --no-install-recommends "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_packages wget ca-certificates
|
||||||
|
|
||||||
# Add NVIDIA's package repository to apt so that we can download packages
|
# Add NVIDIA's package repository to apt so that we can download packages
|
||||||
# Always use the ubuntu2004 repo because the other repos (e.g., debian11) are missing packages
|
# Always use the ubuntu2004 repo because the other repos (e.g., debian11) are missing packages
|
||||||
|
@ -55,4 +72,7 @@ if [ "$INSTALL_NVTX" = "true" ]; then
|
||||||
apt-get install -yq "$nvtx_pkg"
|
apt-get install -yq "$nvtx_pkg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "oryx",
|
"id": "oryx",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "Oryx",
|
"name": "Oryx",
|
||||||
"description": "Installs the oryx CLI",
|
"description": "Installs the oryx CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/oryx",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/oryx",
|
||||||
|
|
|
@ -12,6 +12,9 @@ MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -53,19 +56,17 @@ function updaterc() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
apt_get_update
|
apt_get_update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
|
|
||||||
# Clean up
|
|
||||||
apt-get clean -y
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +106,8 @@ fi
|
||||||
# If we don't already have Oryx installed, install it now.
|
# If we don't already have Oryx installed, install it now.
|
||||||
if oryx --version > /dev/null ; then
|
if oryx --version > /dev/null ; then
|
||||||
echo "oryx is already installed. Skipping installation."
|
echo "oryx is already installed. Skipping installation."
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -182,4 +185,7 @@ if [[ "${DOTNET_INSTALLATION_PACKAGE}" != "" ]]; then
|
||||||
apt purge -yq $DOTNET_INSTALLATION_PACKAGE
|
apt purge -yq $DOTNET_INSTALLATION_PACKAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "php",
|
"id": "php",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "PHP",
|
"name": "PHP",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/php",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/php",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
VERSION=${VERSION:-"latest"}
|
VERSION=${VERSION:-"latest"}
|
||||||
INSTALL_COMPOSER=${INSTALLCOMPOSER:-"true"}
|
INSTALL_COMPOSER=${INSTALLCOMPOSER:-"true"}
|
||||||
OVERRIDE_DEFAULT_VERSION=${OVERRIDEDEFAULTVERSION:-"true"}
|
OVERRIDE_DEFAULT_VERSION=${OVERRIDEDEFAULTVERSION:-"true"}
|
||||||
|
@ -73,7 +76,10 @@ updaterc() {
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
check_packages() {
|
check_packages() {
|
||||||
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
if ! dpkg -s "$@" > /dev/null 2>&1; then
|
||||||
apt-get update
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
echo "Running apt-get update..."
|
||||||
|
apt-get update -y
|
||||||
|
fi
|
||||||
apt-get -y install --no-install-recommends "$@"
|
apt-get -y install --no-install-recommends "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -222,4 +228,7 @@ chown -R "${USERNAME}:php" "${PHP_DIR}"
|
||||||
chmod -R g+r+w "${PHP_DIR}"
|
chmod -R g+r+w "${PHP_DIR}"
|
||||||
find "${PHP_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
find "${PHP_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "powershell",
|
"id": "powershell",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"name": "PowerShell",
|
"name": "PowerShell",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
|
||||||
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
POWERSHELL_VERSION=${VERSION:-"latest"}
|
POWERSHELL_VERSION=${VERSION:-"latest"}
|
||||||
|
|
||||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||||
|
@ -74,8 +77,10 @@ get_common_setting() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -118,8 +123,7 @@ install_using_github() {
|
||||||
# Fall back on direct download if no apt package exists in microsoft pool
|
# Fall back on direct download if no apt package exists in microsoft pool
|
||||||
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
|
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get install -y --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
if [ "${architecture}" = "amd64" ]; then
|
if [ "${architecture}" = "amd64" ]; then
|
||||||
architecture="x64"
|
architecture="x64"
|
||||||
|
@ -161,4 +165,7 @@ if [ "${use_github}" = "true" ]; then
|
||||||
install_using_github
|
install_using_github
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "python",
|
"id": "python",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"name": "Python",
|
"name": "Python",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
|
||||||
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
|
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
|
||||||
|
|
|
@ -34,6 +34,9 @@ keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -199,8 +202,10 @@ oryx_install() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -232,8 +237,7 @@ install_from_source() {
|
||||||
libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \
|
libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \
|
||||||
libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
|
libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find version using soft match
|
# Find version using soft match
|
||||||
|
@ -454,4 +458,7 @@ if [ "${INSTALL_JUPYTERLAB}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ruby",
|
"id": "ruby",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"name": "Ruby (via rvm)",
|
"name": "Ruby (via rvm)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby",
|
||||||
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
|
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
|
||||||
|
|
|
@ -28,6 +28,9 @@ keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -154,8 +157,10 @@ find_version_from_git_tags() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -180,8 +185,7 @@ check_packages curl ca-certificates software-properties-common build-essential g
|
||||||
procps dirmngr gawk autoconf automake bison libffi-dev libgdbm-dev libncurses5-dev \
|
procps dirmngr gawk autoconf automake bison libffi-dev libgdbm-dev libncurses5-dev \
|
||||||
libsqlite3-dev libtool libyaml-dev pkg-config sqlite3 zlib1g-dev libgmp-dev libssl-dev
|
libsqlite3-dev libtool libyaml-dev pkg-config sqlite3 zlib1g-dev libgmp-dev libssl-dev
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -301,4 +305,7 @@ find "/usr/local/rvm/" -type d | xargs -n 1 chmod g+s
|
||||||
rvm cleanup all
|
rvm cleanup all
|
||||||
${ROOT_GEM} cleanup
|
${ROOT_GEM} cleanup
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "rust",
|
"id": "rust",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "Rust",
|
"name": "Rust",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
|
||||||
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
||||||
|
|
|
@ -18,6 +18,9 @@ UPDATE_RUST=${UPDATE_RUST:-"false"}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -127,8 +130,18 @@ updaterc() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks if packages are installed and installs them if not
|
||||||
|
check_packages() {
|
||||||
|
if ! dpkg -s "$@" >/dev/null 2>&1; then
|
||||||
|
apt_get_update
|
||||||
|
apt-get -y install --no-install-recommends "$@"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -170,8 +183,7 @@ else
|
||||||
if [ "${RUST_VERSION}" != "latest" ] && [ "${RUST_VERSION}" != "lts" ] && [ "${RUST_VERSION}" != "stable" ]; then
|
if [ "${RUST_VERSION}" != "latest" ] && [ "${RUST_VERSION}" != "lts" ] && [ "${RUST_VERSION}" != "stable" ]; then
|
||||||
# Find version using soft match
|
# Find version using soft match
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
is_nightly=0
|
is_nightly=0
|
||||||
|
@ -215,5 +227,8 @@ EOF
|
||||||
# Make files writable for rustlang group
|
# Make files writable for rustlang group
|
||||||
chmod -R g+r+w "${RUSTUP_HOME}" "${CARGO_HOME}"
|
chmod -R g+r+w "${RUSTUP_HOME}" "${CARGO_HOME}"
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "sshd",
|
"id": "sshd",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "SSH server",
|
"name": "SSH server",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/sshd",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/sshd",
|
||||||
"description": "Adds a SSH server into a container so that you can use an external terminal, sftp, or SSHFS to interact with it.",
|
"description": "Adds a SSH server into a container so that you can use an external terminal, sftp, or SSHFS to interact with it.",
|
||||||
|
|
|
@ -17,6 +17,9 @@ FIX_ENVIRONMENT=${FIX_ENVIRONMENT:-"true"}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -41,8 +44,10 @@ fi
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -166,4 +171,8 @@ echo -e "Done!\n\n- Port: ${SSHD_PORT}\n- User: ${USERNAME}"
|
||||||
if [ "${EMIT_PASSWORD}" = "true" ]; then
|
if [ "${EMIT_PASSWORD}" = "true" ]; then
|
||||||
echo "- Password: ${NEW_PASSWORD}"
|
echo "- Password: ${NEW_PASSWORD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n"
|
echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "terraform",
|
"id": "terraform",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"name": "Terraform, tflint, and TFGrunt",
|
"name": "Terraform, tflint, and TFGrunt",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
|
||||||
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
TERRAFORM_VERSION="${VERSION:-"latest"}"
|
TERRAFORM_VERSION="${VERSION:-"latest"}"
|
||||||
TFLINT_VERSION="${TFLINT:-"latest"}"
|
TFLINT_VERSION="${TFLINT:-"latest"}"
|
||||||
TERRAGRUNT_VERSION="${TERRAGRUNT:-"latest"}"
|
TERRAGRUNT_VERSION="${TERRAGRUNT:-"latest"}"
|
||||||
|
@ -124,8 +127,10 @@ find_version_from_git_tags() {
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if packages are installed and installs them if not
|
# Checks if packages are installed and installs them if not
|
||||||
|
@ -142,8 +147,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Install dependencies if missing
|
# Install dependencies if missing
|
||||||
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip
|
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
apt_get_update
|
check_packages git
|
||||||
apt-get -y install --no-install-recommends git
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify requested version is available, convert latest
|
# Verify requested version is available, convert latest
|
||||||
|
@ -209,4 +213,8 @@ if [ "${TERRAGRUNT_VERSION}" != "none" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /tmp/tf-downloads ${GNUPGHOME}
|
rm -rf /tmp/tf-downloads ${GNUPGHOME}
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
Loading…
Reference in a new issue