Skip to content

Commit

Permalink
chore(containers): BREAKING CHAINGE remove ubuntu (#28041)
Browse files Browse the repository at this point in the history
**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?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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._
  • Loading branch information
PrivatePuffin authored Oct 19, 2024
1 parent d0e0dac commit b7501e0
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 451 deletions.
19 changes: 7 additions & 12 deletions containers/apps/db-wait-mariadb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
49 changes: 20 additions & 29 deletions containers/apps/db-wait-mongodb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
32 changes: 11 additions & 21 deletions containers/apps/db-wait-postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
35 changes: 14 additions & 21 deletions containers/apps/db-wait-redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion containers/apps/freeradius/BASE

This file was deleted.

27 changes: 0 additions & 27 deletions containers/apps/freeradius/Dockerfile

This file was deleted.

Empty file removed containers/apps/freeradius/VERSION
Empty file.
33 changes: 0 additions & 33 deletions containers/apps/freeradius/entrypoint.sh

This file was deleted.

4 changes: 0 additions & 4 deletions containers/apps/freeradius/goss.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions containers/apps/freeradius/latest-base.sh

This file was deleted.

6 changes: 0 additions & 6 deletions containers/apps/freeradius/latest-version.sh

This file was deleted.

59 changes: 0 additions & 59 deletions containers/apps/ombi/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion containers/apps/ombi/VERSION

This file was deleted.

7 changes: 0 additions & 7 deletions containers/apps/ombi/entrypoint.sh

This file was deleted.

6 changes: 0 additions & 6 deletions containers/apps/ombi/latest-version.sh

This file was deleted.

6 changes: 3 additions & 3 deletions containers/base/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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", "--"]

Expand Down
Loading

0 comments on commit b7501e0

Please sign in to comment.