From b7501e0aed708a74818fba738a869918c3e6c92f Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sat, 19 Oct 2024 17:29:51 +0200 Subject: [PATCH] chore(containers): BREAKING CHAINGE remove ubuntu (#28041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** In favor of standardizing around Alpine where we can. **โš™๏ธ Type of change** - [x] โš™๏ธ Feature/App addition - [ ] ๐Ÿช› Bugfix - [x] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [ ] โš–๏ธ My code follows the style guidelines of this project - [ ] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [ ] โฌ†๏ธ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿ–ผ๏ธ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- containers/apps/db-wait-mariadb/Dockerfile | 19 +-- containers/apps/db-wait-mongodb/Dockerfile | 49 +++---- containers/apps/db-wait-postgres/Dockerfile | 32 ++--- containers/apps/db-wait-redis/Dockerfile | 35 ++--- containers/apps/freeradius/BASE | 1 - containers/apps/freeradius/Dockerfile | 27 ---- containers/apps/freeradius/VERSION | 0 containers/apps/freeradius/entrypoint.sh | 33 ----- containers/apps/freeradius/goss.yaml | 4 - containers/apps/freeradius/latest-base.sh | 2 - containers/apps/freeradius/latest-version.sh | 6 - containers/apps/ombi/Dockerfile | 59 --------- containers/apps/ombi/VERSION | 1 - containers/apps/ombi/entrypoint.sh | 7 - containers/apps/ombi/latest-version.sh | 6 - containers/base/alpine/Dockerfile | 6 +- containers/base/ubuntu/Dockerfile | 132 ------------------- containers/base/ubuntu/PLATFORM | 2 - containers/base/ubuntu/VERSION | 1 - containers/base/ubuntu/entrypoint.sh | 7 - containers/base/ubuntu/shim/greeting.sh | 13 -- containers/base/ubuntu/shim/sleep.sh | 28 ---- containers/base/ubuntu/shim/steppingstone.sh | 23 ---- containers/base/ubuntu/shim/umask.sh | 3 - containers/base/ubuntu/shim/vpn.sh | 10 -- 25 files changed, 55 insertions(+), 451 deletions(-) delete mode 100644 containers/apps/freeradius/BASE delete mode 100644 containers/apps/freeradius/Dockerfile delete mode 100644 containers/apps/freeradius/VERSION delete mode 100755 containers/apps/freeradius/entrypoint.sh delete mode 100644 containers/apps/freeradius/goss.yaml delete mode 100755 containers/apps/freeradius/latest-base.sh delete mode 100755 containers/apps/freeradius/latest-version.sh delete mode 100644 containers/apps/ombi/Dockerfile delete mode 100644 containers/apps/ombi/VERSION delete mode 100755 containers/apps/ombi/entrypoint.sh delete mode 100755 containers/apps/ombi/latest-version.sh delete mode 100644 containers/base/ubuntu/Dockerfile delete mode 100644 containers/base/ubuntu/PLATFORM delete mode 100644 containers/base/ubuntu/VERSION delete mode 100755 containers/base/ubuntu/entrypoint.sh delete mode 100755 containers/base/ubuntu/shim/greeting.sh delete mode 100755 containers/base/ubuntu/shim/sleep.sh delete mode 100755 containers/base/ubuntu/shim/steppingstone.sh delete mode 100755 containers/base/ubuntu/shim/umask.sh delete mode 100755 containers/base/ubuntu/shim/vpn.sh diff --git a/containers/apps/db-wait-mariadb/Dockerfile b/containers/apps/db-wait-mariadb/Dockerfile index e607ee4b9769..e47b1bb96710 100644 --- a/containers/apps/db-wait-mariadb/Dockerfile +++ b/containers/apps/db-wait-mariadb/Dockerfile @@ -1,35 +1,30 @@ # hadolint ignore=DL3007 -FROM ghcr.io/truecharts/ubuntu:latest@sha256:cbe66cbca1ddd2a82093675067c363af8bbc6713b645bc77cb1706578a01facd +FROM tccr.io/tccr/alpine:latest ARG TARGETPLATFORM ARG VERSION USER root -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/sh", "-o", "pipefail", "-c"] # hadolint ignore=DL3008,DL3015,SC2086,SC2155 RUN \ - apt-get -qq update \ - && \ - apt-get -qq install -y \ + apk update && \ + apk --no-cache add \ mariadb-client \ && \ case "${TARGETPLATFORM}" in \ 'linux/amd64') export ARCH='linux-x64' ;; \ esac \ - && apt-get remove -y \ + && apk del \ jq \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ && \ rm -rf \ /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/ \ + /var/cache/apk/* \ && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ + && printf "umask %d" "${UMASK}" >> /etc/profile \ && update-ca-certificates USER apps diff --git a/containers/apps/db-wait-mongodb/Dockerfile b/containers/apps/db-wait-mongodb/Dockerfile index e20ffbfe1430..977177f2fea6 100644 --- a/containers/apps/db-wait-mongodb/Dockerfile +++ b/containers/apps/db-wait-mongodb/Dockerfile @@ -1,44 +1,35 @@ # hadolint ignore=DL3007 -FROM ghcr.io/truecharts/ubuntu:latest@sha256:cbe66cbca1ddd2a82093675067c363af8bbc6713b645bc77cb1706578a01facd +FROM tccr.io/tccr/alpine:latest ARG TARGETPLATFORM ARG VERSION USER root -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/sh", "-o", "pipefail", "-c"] # hadolint ignore=DL3008,DL3015,SC2086,SC2155,DL4001 RUN \ - curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg \ - && \ - echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list \ - && \ - wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - \ - && \ - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list \ - && \ + apk update && \ + apk add --no-cache \ + curl \ + ca-certificates \ + gnupg \ + bash && \ + curl -fsSLo /etc/apk/keys/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \ + echo "https://dl-cdn.alpinelinux.org/alpine/v3.16/community" >> /etc/apk/repositories && \ + curl -fsSL https://downloads.mongodb.com/compass/mongosh-1.8.0-linux-x64.tgz -o /tmp/mongosh.tgz && \ + tar -xvzf /tmp/mongosh.tgz -C /tmp && \ + mv /tmp/mongosh*/bin/mongosh /usr/local/bin/ && \ + chmod +x /usr/local/bin/mongosh && \ + apk del gnupg && \ case "${TARGETPLATFORM}" in \ 'linux/amd64') export ARCH='linux-x64' ;; \ - esac \ - && \ - apt-get -qq update \ - && \ - apt-get -qq install -y \ - mongodb-mongosh \ - && apt-get remove -y \ - jq \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ - && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/ \ - && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ - && update-ca-certificates + esac && \ + rm -rf /tmp/* /var/cache/apk/* && \ + chmod -R u=rwX,go=rX /app && \ + printf "umask %d" "${UMASK}" >> /etc/profile && \ + update-ca-certificates USER apps diff --git a/containers/apps/db-wait-postgres/Dockerfile b/containers/apps/db-wait-postgres/Dockerfile index 2b0790c98897..7696e525681e 100644 --- a/containers/apps/db-wait-postgres/Dockerfile +++ b/containers/apps/db-wait-postgres/Dockerfile @@ -1,36 +1,26 @@ # hadolint ignore=DL3007 -FROM ghcr.io/truecharts/ubuntu:latest@sha256:cbe66cbca1ddd2a82093675067c363af8bbc6713b645bc77cb1706578a01facd +FROM tccr.io/tccr/alpine:latest ARG TARGETPLATFORM ARG VERSION USER root -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/sh", "-o", "pipefail", "-c"] # hadolint ignore=DL3008,DL3015,SC2086,SC2155 RUN \ - apt-get -qq update \ - && \ - apt-get -qq install -y \ - postgresql-client \ - && \ +apk update && \ + apk --no-cache update && \ + apk --no-cache add \ + postgresql-client && \ case "${TARGETPLATFORM}" in \ 'linux/amd64') export ARCH='linux-x64' ;; \ - esac \ - && apt-get remove -y \ - jq \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ - && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/ \ - && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ - && update-ca-certificates + esac && \ + apk del --no-cache jq && \ + rm -rf /var/cache/apk/* /tmp/* /var/tmp/* && \ + chmod -R u=rwX,go=rX /app && \ + printf "umask %d" "${UMASK}" >> /etc/profile USER apps diff --git a/containers/apps/db-wait-redis/Dockerfile b/containers/apps/db-wait-redis/Dockerfile index eb999f84bb65..afc1f3902d6c 100644 --- a/containers/apps/db-wait-redis/Dockerfile +++ b/containers/apps/db-wait-redis/Dockerfile @@ -1,36 +1,29 @@ # hadolint ignore=DL3007 -FROM ghcr.io/truecharts/ubuntu:latest@sha256:cbe66cbca1ddd2a82093675067c363af8bbc6713b645bc77cb1706578a01facd +FROM tccr.io/tccr/alpine:latest ARG TARGETPLATFORM ARG VERSION USER root -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/ash", "-o", "pipefail", "-c"] # hadolint ignore=DL3008,DL3015,SC2086,SC2155 RUN \ - apt-get -qq update \ - && \ - apt-get -qq install -y \ - redis-server \ - && \ +apk update && \ + apk update && \ + apk add --no-cache \ + redis \ + bash && \ case "${TARGETPLATFORM}" in \ 'linux/amd64') export ARCH='linux-x64' ;; \ - esac \ - && apt-get remove -y \ - jq \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ - && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/ \ - && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ - && update-ca-certificates + esac && \ + apk del \ + jq && \ + rm -rf /var/cache/apk/* && \ + chmod -R u=rwX,go=rX /app && \ + printf "umask %d" "${UMASK}" >> /etc/profile && \ + update-ca-certificates USER apps diff --git a/containers/apps/freeradius/BASE b/containers/apps/freeradius/BASE deleted file mode 100644 index f97ff28ec907..000000000000 --- a/containers/apps/freeradius/BASE +++ /dev/null @@ -1 +0,0 @@ -jammy diff --git a/containers/apps/freeradius/Dockerfile b/containers/apps/freeradius/Dockerfile deleted file mode 100644 index babca5056a9c..000000000000 --- a/containers/apps/freeradius/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -ARG TARGETPLATFORM -ARG VERSION -# hadolint ignore=DL3007 -FROM freeradius/freeradius-server:${VERSION} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# hadolint ignore=DL3008,DL3015,SC2086,SC2155 -RUN \ - rm /docker-entrypoint.sh && \ - rm -Rf /etc/raddb - -VOLUME /etc/raddb -COPY ./containers/apps/freeradius/entrypoint.sh /docker-entrypoint.sh - -LABEL "maintainer"="TrueCharts " -LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps" - -ARG CONTAINER_NAME -ARG CONTAINER_VER -LABEL org.opencontainers.image.licenses="BSD-3-Clause" -LABEL org.opencontainers.image.title="${CONTAINER_NAME}" -LABEL org.opencontainers.image.url="https://truecharts.org/docs/charts/${CONTAINER_NAME}" -LABEL org.opencontainers.image.version="${CONTAINER_VER}" -LABEL org.opencontainers.image.description="Container for ${CONTAINER_NAME} by TrueCharts" -LABEL org.opencontainers.image.authors="TrueCharts" -LABEL org.opencontainers.image.documentation="https://truecharts.org/docs/charts/${CONTAINER_NAME}" diff --git a/containers/apps/freeradius/VERSION b/containers/apps/freeradius/VERSION deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/containers/apps/freeradius/entrypoint.sh b/containers/apps/freeradius/entrypoint.sh deleted file mode 100755 index 6a51731a1715..000000000000 --- a/containers/apps/freeradius/entrypoint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -set -e - -if [ -f "/etc/raddb/clients.conf" ]; then - echo "Radius config already exists, skipping config copy..." -else - echo "Radius config does not exist, copying..." - cp -Rf /etc/freeradius/* /etc/raddb/ -fi - -chown -R freerad:freerad /etc/raddb/ - -# this if will check if the first argument is a flag -# but only works if all arguments require a hyphenated flag -# -v; -SL; -f arg; etc will work, but not arg1 arg2 -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- freeradius -d /etc/raddb "$@" -fi - -# check for the expected command -if [ "$1" = 'freeradius' ]; then - shift - exec freeradius -f -d /etc/raddb "$@" -fi - -# many people are likely to call "radiusd" as well, so allow that -if [ "$1" = 'radiusd' ]; then - shift - exec freeradius -f -d /etc/raddb "$@" -fi - -# else default to run whatever the user wanted like "bash" or "sh" -exec "$@" diff --git a/containers/apps/freeradius/goss.yaml b/containers/apps/freeradius/goss.yaml deleted file mode 100644 index 6c8aaf524d8f..000000000000 --- a/containers/apps/freeradius/goss.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -port: - udp:1812: - listening: true diff --git a/containers/apps/freeradius/latest-base.sh b/containers/apps/freeradius/latest-base.sh deleted file mode 100755 index 4ed8c26b5f5a..000000000000 --- a/containers/apps/freeradius/latest-base.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -cat "./base/ubuntu/VERSION" diff --git a/containers/apps/freeradius/latest-version.sh b/containers/apps/freeradius/latest-version.sh deleted file mode 100755 index 83001f376052..000000000000 --- a/containers/apps/freeradius/latest-version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -version=$(curl "https://registry.hub.docker.com/v1/repositories/freeradius/freeradius-server/tags" | jq --raw-output '.[].name' | grep -v layer | grep -v alpine | grep -v latest | tail -n1) -version="${version#*v}" -version="${version#*release-}" -echo "${version}" diff --git a/containers/apps/ombi/Dockerfile b/containers/apps/ombi/Dockerfile deleted file mode 100644 index 9d14c8fe94eb..000000000000 --- a/containers/apps/ombi/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -# hadolint ignore=DL3007 -FROM ghcr.io/truecharts/ubuntu:latest@sha256:cbe66cbca1ddd2a82093675067c363af8bbc6713b645bc77cb1706578a01facd - -ARG TARGETPLATFORM -ARG VERSION - -USER root - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# hadolint ignore=DL3008,DL3015,SC2086,SC2155 -RUN \ - apt-get -qq update \ - && \ - case "${TARGETPLATFORM}" in \ - 'linux/amd64') export ARCH='linux-x64' ;; \ - esac \ - && \ - export URL=$(curl -sX GET https://api.github.com/repos/Ombi-app/Ombi/releases | \ - jq -r '.[] | select(.tag_name | contains(env.VERSION)) | .assets[] | select(.browser_download_url | contains(env.ARCH)) | .browser_download_url') \ - && curl -fsSL -o /tmp/ombi.tgz "${URL}" \ - && tar ixzf /tmp/ombi.tgz -C /app \ - && \ - rm -rf \ - /tmp/ombi.tgz \ - && printf "UpdateMethod=docker\nPackageVersion=%s\nPackageAuthor=[TrueCharts Project](https://truecharts.org)" "${VERSION}" > /app/package_info \ - && apt-get remove -y \ - jq \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ - && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/ \ - && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ - && update-ca-certificates - -USER apps - -EXPOSE 3579 - -COPY ./containers/apps/ombi/entrypoint.sh /entrypoint.sh -CMD ["/entrypoint.sh"] - -LABEL "maintainer"="TrueCharts " -LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps" - -ARG CONTAINER_NAME -ARG CONTAINER_VER -LABEL org.opencontainers.image.licenses="BSD-3-Clause" -LABEL org.opencontainers.image.title="${CONTAINER_NAME}" -LABEL org.opencontainers.image.url="https://truecharts.org/docs/charts/${CONTAINER_NAME}" -LABEL org.opencontainers.image.version="${CONTAINER_VER}" -LABEL org.opencontainers.image.description="Container for ${CONTAINER_NAME} by TrueCharts" -LABEL org.opencontainers.image.authors="TrueCharts" -LABEL org.opencontainers.image.documentation="https://truecharts.org/docs/charts/${CONTAINER_NAME}" diff --git a/containers/apps/ombi/VERSION b/containers/apps/ombi/VERSION deleted file mode 100644 index f1cecb05f54e..000000000000 --- a/containers/apps/ombi/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.46.4 diff --git a/containers/apps/ombi/entrypoint.sh b/containers/apps/ombi/entrypoint.sh deleted file mode 100755 index e26ce84ed121..000000000000 --- a/containers/apps/ombi/entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -#shellcheck disable=SC1091 -source "/shim/umask.sh" -source "/shim/vpn.sh" - -exec /app/Ombi --host http://0.0.0.0:3579 --storage /config ${EXTRA_ARGS} diff --git a/containers/apps/ombi/latest-version.sh b/containers/apps/ombi/latest-version.sh deleted file mode 100755 index a0065554ed71..000000000000 --- a/containers/apps/ombi/latest-version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -version=$(curl -sX GET "https://api.github.com/repos/Ombi-app/Ombi/releases" | jq --raw-output '.[0].tag_name') -version="${version#*v}" -version="${version#*release-}" -printf "%s" "${version}" diff --git a/containers/base/alpine/Dockerfile b/containers/base/alpine/Dockerfile index 6299ee46b00d..57d178d09d1b 100644 --- a/containers/base/alpine/Dockerfile +++ b/containers/base/alpine/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /app # hadolint ignore=DL3018 RUN \ - apk update && apk add --no-cache ca-certificates bash util-linux coreutils grep procps \ + apk update && apk add --no-cache jq nano ca-certificates bash util-linux coreutils grep procps \ && addgroup apps -g 568 \ && adduser apps -u 568 -g 568 -D -S -H \ && mkdir -p /config \ @@ -28,8 +28,8 @@ VOLUME [ "/config" ] USER apps -COPY ./containers/base/ubuntu/entrypoint.sh /entrypoint.sh -COPY ./containers/base/ubuntu/shim /etc/profile.d +COPY ./containers/base/alpine/entrypoint.sh /entrypoint.sh +COPY ./containers/base/alpine/shim /etc/profile.d ENTRYPOINT ["/bin/ash", "--"] diff --git a/containers/base/ubuntu/Dockerfile b/containers/base/ubuntu/Dockerfile deleted file mode 100644 index 5aba993b7d12..000000000000 --- a/containers/base/ubuntu/Dockerfile +++ /dev/null @@ -1,132 +0,0 @@ -FROM ubuntu:noble@sha256:d4f6f70979d0758d7a6f81e34a61195677f4f4fa576eaf808b79f17499fd93d1 - -ARG TARGETPLATFORM -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# hadolint ignore=DL3002 -USER root - -ARG CHANNEL -ARG TARGETPLATFORM -ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} - -# DEBIAN_FRONTEND: https://askubuntu.com/questions/972516/debian-frontend-environment-variable -# APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: http://stackoverflow.com/questions/48162574/ddg#49462622 -ENV \ - DEBCONF_NONINTERACTIVE_SEEN=true \ - DEBIAN_FRONTEND="noninteractive" \ - APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn \ - UMASK="0002" \ - TZ="Etc/UTC" - -RUN \ - adduser apps \ - --uid 568 \ - --group \ - --system \ - --disabled-password \ - --no-create-home \ - && \ - mkdir -p /config \ - && chown -R apps:apps /config \ - && chmod -R 775 /config - -WORKDIR /app - -# hadolint ignore=DL3008,DL3015 -RUN \ - set -eux \ - && echo 'APT::Install-Recommends "false";' >/etc/apt/apt.conf.d/00recommends \ - && echo 'APT::Install-Suggests "false";' >>/etc/apt/apt.conf.d/00recommends \ - && echo 'APT::Get::Install-Recommends "false";' >>/etc/apt/apt.conf.d/00recommends \ - && echo 'APT::Get::Install-Suggests "false";' >>/etc/apt/apt.conf.d/00recommends \ - && \ - apt-get -qq update \ - && \ - apt-get install -y \ - bash \ - ca-certificates \ - curl \ - dnsutils \ - iputils-ping \ - jo \ - jq \ - gnupg \ - locales \ - moreutils \ - pv \ - tini \ - nano \ - tzdata \ - vim-tiny \ - unrar \ - unzip \ - wget \ - redis-server \ - postgresql-client \ - mariadb-client \ - libicu70 \ - pv \ - git \ - && \ - localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ - && ln -s /usr/bin/vim.tiny /usr/local/bin/vi \ - && ln -s /usr/bin/vim.tiny /usr/local/bin/vim \ - && ln -s /usr/bin/vim.tiny /usr/local/bin/nano \ - && ln -s /usr/bin/vim.tiny /usr/local/bin/emacs \ - && \ - curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg \ - && \ - echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list \ - && \ - wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - \ - && \ - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list \ - && \ - case "${TARGETPLATFORM}" in \ - 'linux/amd64') export ARCH='linux-x64' ;; \ - esac \ - && \ - apt-get -qq update \ - && \ - apt-get -qq install -y \ - mongodb-mongosh \ - kubectl \ - && chown -R apps:apps /app \ - && \ - printf "/bin/bash /shim/greeting.sh\n" >> /etc/bash.bashrc \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && apt-get autoremove -y \ - && apt-get clean \ - && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/cache/apt/* \ - /var/tmp/* \ - && chmod -R u=rwX,go=rX /app \ - && printf "umask %d" "${UMASK}" >> /etc/bash.bashrc \ - && update-ca-certificates - -ENV LANG en_US.UTF-8 - -VOLUME ["/config"] - -COPY ./containers/base/ubuntu/entrypoint.sh /entrypoint.sh -COPY ./containers/base/ubuntu/shim /shim - -USER apps - -ENTRYPOINT [ "/usr/bin/tini", "--" ] - -ARG CONTAINER_NAME -ARG CONTAINER_VER -LABEL "maintainer"="TrueCharts " -LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps" -LABEL org.opencontainers.image.licenses="BSD-3-Clause" -LABEL org.opencontainers.image.title="${CONTAINER_NAME}" -LABEL org.opencontainers.image.url="https://truecharts.org/docs/charts/${CONTAINER_NAME}" -LABEL org.opencontainers.image.version="${CONTAINER_VER}" -LABEL org.opencontainers.image.description="Container for ${CONTAINER_NAME} by TrueCharts" -LABEL org.opencontainers.image.authors="TrueCharts" -LABEL org.opencontainers.image.documentation="https://truecharts.org/docs/charts/${CONTAINER_NAME}" diff --git a/containers/base/ubuntu/PLATFORM b/containers/base/ubuntu/PLATFORM deleted file mode 100644 index 6ca7f3447dfa..000000000000 --- a/containers/base/ubuntu/PLATFORM +++ /dev/null @@ -1,2 +0,0 @@ -linux/amd64 -linux/arm64 diff --git a/containers/base/ubuntu/VERSION b/containers/base/ubuntu/VERSION deleted file mode 100644 index f97ff28ec907..000000000000 --- a/containers/base/ubuntu/VERSION +++ /dev/null @@ -1 +0,0 @@ -jammy diff --git a/containers/base/ubuntu/entrypoint.sh b/containers/base/ubuntu/entrypoint.sh deleted file mode 100755 index e9444a5a2ee5..000000000000 --- a/containers/base/ubuntu/entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -#shellcheck disable=SC1091 -source "/shim/umask.sh" -source "/shim/vpn.sh" - -exec "$@" diff --git a/containers/base/ubuntu/shim/greeting.sh b/containers/base/ubuntu/shim/greeting.sh deleted file mode 100755 index b078415273be..000000000000 --- a/containers/base/ubuntu/shim/greeting.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -echo " -Welcome to a TrueCharts container, -You are entering the vicinity of an area adjacent to a location. -The kind of place where there might be a monster, or some kind of weird mirror. -These are just examples; it could also be something much better. -* Repository: https://github.com/truecharts/containers -* Docs: https://truecharts.org -* This container uses the micro CLI text editor or nano respectively -* Bugs or feature requests should be opened in an GH issue -* Questions should be discussed in Discord -" diff --git a/containers/base/ubuntu/shim/sleep.sh b/containers/base/ubuntu/shim/sleep.sh deleted file mode 100755 index 254c3dca004a..000000000000 --- a/containers/base/ubuntu/shim/sleep.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -min_seconds="${1:-1}" -max_seconds="${2:-3600}" -seconds="$(shuf -i "${min_seconds}"-"${max_seconds}" -n 1)" - -function logz { - msg="${1}" - level="${2:-info}" - printf "\e[1;32m%-6s\e[m\n" "timestamp=\"$(date +"%Y-%m-%dT%H:%M:%S%z")\" level=\"${level}\" msg=\"${msg}\"" -} - -function datez { - secs="${1}" - printf "%dh%dm%ds" $((secs/3600)) $((secs%3600/60)) $((secs%60)) -} - -printf "\e[1;32m%-6s\e[m\n" "$(logz "min seconds set to ${min_seconds}" "debug")" -printf "\e[1;32m%-6s\e[m\n" "$(logz "max seconds set to ${max_seconds}" "debug")" - -printf "\e[1;32m%-6s\e[m\n" "$(logz "sleeping for $(datez "${seconds}")" "info")" - -for ((i=seconds;i>0;i--)); do - printf "\e[1;32m%-6s\e[m\n" "$(logz "sleeping for $(datez "${i}")" "info")" - sleep 1 -done - -printf "\e[1;32m%-6s\e[m\n" "$(logz "done" "debug")" diff --git a/containers/base/ubuntu/shim/steppingstone.sh b/containers/base/ubuntu/shim/steppingstone.sh deleted file mode 100755 index 9a2de2a5eeab..000000000000 --- a/containers/base/ubuntu/shim/steppingstone.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -#shellcheck disable=SC1091 -source "/shim/umask.sh" -source "/shim/vpn.sh" - -echo "---Checking for optional user script---" -if [ -f /custom/user.sh ]; then - echo "---Found optional script, executing---" - chmod +x /custom/user.sh - /custom/user.sh -else - echo "---No optional user script found, continuing---" -fi - -echo "---Checking for container script---" -if [ -f /custom/start.sh ]; then - echo "---Found container script, executing---" - chmod +x /custom/start.sh - /custom/start.sh -else - echo "---No container script found, continuing---" -fi diff --git a/containers/base/ubuntu/shim/umask.sh b/containers/base/ubuntu/shim/umask.sh deleted file mode 100755 index bea3cc3535ea..000000000000 --- a/containers/base/ubuntu/shim/umask.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -umask "${UMASK:-0002}" diff --git a/containers/base/ubuntu/shim/vpn.sh b/containers/base/ubuntu/shim/vpn.sh deleted file mode 100755 index 936ed5096c50..000000000000 --- a/containers/base/ubuntu/shim/vpn.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [[ "${WAIT_FOR_VPN:-"false"}" == "true" ]]; then - echo "Waiting for VPN to be connected..." - while ! grep -s -q "connected" /shared/vpnstatus; do - echo "VPN not connected" - sleep 2 - done - echo "VPN Connected, starting application..." -fi