Skip to content

Commit

Permalink
chore(deps): pin ubuntu docker tag to 80dd3c3 (#31172)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| ubuntu | final | pinDigest |  -> `80dd3c3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44Ni4xIiwidXBkYXRlZEluVmVyIjoiMzkuODYuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiXX0=-->

---------

Signed-off-by: Alfred Göppel <[email protected]>
Co-authored-by: Alfred Göppel <[email protected]>
  • Loading branch information
truecharts-admin and alfi0812 authored Jan 26, 2025
1 parent 69ce650 commit c24ebf6
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 3 deletions.
60 changes: 57 additions & 3 deletions containers/apps/db-wait-mongodb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint ignore=DL3007
FROM ubuntu:latest
FROM ubuntu:latest@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab

ARG TARGETPLATFORM
ARG VERSION
Expand All @@ -8,12 +8,66 @@ USER root

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV \

Check warning on line 11 in containers/apps/db-wait-mongodb/Dockerfile

View workflow job for this annotation

GitHub Actions / Build (db-wait-mongodb)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEBCONF_NONINTERACTIVE_SEEN=true \
DEBIAN_FRONTEND="noninteractive" \
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn \
UMASK="0002" \
TZ="Etc/UTC"

WORKDIR /app

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 \
libicu74 \
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

ENV LANG en_US.UTF-8

Check warning on line 61 in containers/apps/db-wait-mongodb/Dockerfile

View workflow job for this annotation

GitHub Actions / Build (db-wait-mongodb)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

VOLUME ["/config"]

COPY ./containers/apps/db-wait-mongodb/shim /shim

# 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 \
Expand Down
21 changes: 21 additions & 0 deletions containers/apps/db-wait-mongodb/shim/sleep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/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")"
20 changes: 20 additions & 0 deletions containers/apps/db-wait-mongodb/shim/steppingstone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/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
3 changes: 3 additions & 0 deletions containers/apps/db-wait-mongodb/shim/umask.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

umask "${UMASK:-0002}"
10 changes: 10 additions & 0 deletions containers/apps/db-wait-mongodb/shim/vpn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/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

0 comments on commit c24ebf6

Please sign in to comment.