Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename gosu #2134

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/bci_build/package/mariadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from bci_build.package.helpers import generate_package_version_check
from bci_build.package.versions import get_pkg_version

_MARIADB_GOSU = b"""#!/bin/bash
_MARIADB_IDEXEC = b"""#!/bin/bash

u=$1
shift
Expand Down Expand Up @@ -110,7 +110,7 @@
Path(__file__).parent / "mariadb" / str(mariadb_version) / "LICENSE"
).read_bytes(),
"healthcheck.sh": healthcheck,
"gosu": _MARIADB_GOSU,
"idexec": _MARIADB_IDEXEC,
"_constraints": generate_disk_size_constraints(11),
},
support_level=SupportLevel.L3,
Expand All @@ -129,8 +129,12 @@
COPY healthcheck.sh /usr/local/bin/
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/healthcheck.sh

COPY gosu /usr/local/bin/gosu
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/gosu
COPY idexec /usr/local/bin/idexec
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/idexec

# replace gosu calls with idexec
{DOCKERFILE_RUN} sed -i 's/exec gosu /exec idexec /g' /usr/local/bin/{_ENTRYPOINT_FNAME}
{DOCKERFILE_RUN} sed -i 's/exec gosu /exec idexec /g' /usr/local/bin/healthcheck.sh

{DOCKERFILE_RUN} sed -i -e 's,$(pwgen .*),$(openssl rand -base64 36),' /usr/local/bin/{_ENTRYPOINT_FNAME}

Expand Down
Loading