Repository: lldap/lldap (language: rust)

Issue:
[FEATURE REQUEST] Include bootstrap.sh in Docker image
**Motivation**
Please consider adding `bootstrap.sh` to the Docker image. This would enable Kubernetes to execute the script from the same image (by overriding the `COMMAND` at runtime) without having to package the script separately.

My use case is to allow the Helm chart to run `bootstrap.sh` as a one-shot job, then start up lldap as a service, using the same image.

**Describe alternatives you've considered**
Currently the only alternative is to manually copy `bootstrap.sh` into the Helm chart, and keep it updated. I'd rather not :slightly_smiling_face: 



Discussion / hints:
Sure, I'm not opposed to that. Do you want to PR that?
Sure, I'll have a look

Fix patch:
diff --git a/.github/workflows/Dockerfile.ci.alpine-base b/.github/workflows/Dockerfile.ci.alpine-base
index ecf2b954..204ebe0f 100644
--- a/.github/workflows/Dockerfile.ci.alpine-base
+++ b/.github/workflows/Dockerfile.ci.alpine-base
@@ -59,7 +59,7 @@ RUN set -x \
     && for file in $(cat /lldap/app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done \
     && chmod a+r -R .
 
-FROM alpine:3.16
+FROM alpine:3.19
 WORKDIR /app
 ENV UID=1000
 ENV GID=1000
@@ -80,5 +80,6 @@ COPY --from=lldap --chown=$USER:$USER /lldap /app
 VOLUME ["/data"]
 HEALTHCHECK CMD ["/app/lldap", "healthcheck", "--config-file", "/data/lldap_config.toml"]
 WORKDIR /app
+COPY scripts/bootstrap.sh ./
 ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
 CMD ["run", "--config-file", "/data/lldap_config.toml"]
diff --git a/.github/workflows/Dockerfile.ci.debian-base b/.github/workflows/Dockerfile.ci.debian-base
index dc9afde3..c9b04571 100644
--- a/.github/workflows/Dockerfile.ci.debian-base
+++ b/.github/workflows/Dockerfile.ci.debian-base
@@ -74,6 +74,7 @@ COPY --from=lldap --chown=$USER:$USER /lldap /app
 COPY --from=lldap --chown=$USER:$USER /docker-entrypoint.sh /docker-entrypoint.sh
 VOLUME ["/data"]
 WORKDIR /app
+COPY scripts/bootstrap.sh ./
 ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
 CMD ["run", "--config-file", "/data/lldap_config.toml"]
 HEALTHCHECK CMD ["/app/lldap", "healthcheck", "--config-file", "/data/lldap_config.toml"]
diff --git a/Dockerfile b/Dockerfile
index a698fbc8..4560b7af 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,7 +41,7 @@ RUN cargo build --release -p lldap -p lldap_migration_tool -p lldap_set_password
     && ./app/build.sh
 
 # Final image
-FROM alpine:3.16
+FROM alpine:3.19
 
 ENV GOSU_VERSION 1.14
 # Fetch gosu from git
@@ -80,6 +80,7 @@ COPY --from=builder /app/app/static app/static
 COPY --from=builder /app/app/pkg app/pkg
 COPY --from=builder /app/target/release/lldap /app/target/release/lldap_migration_tool /app/target/release/lldap_set_password ./
 COPY docker-entrypoint.sh lldap_config.docker_template.toml ./
+COPY scripts/bootstrap.sh ./
 
 RUN set -x \
     && apk add --no-cache bash tzdata \
diff --git a/example_configs/bootstrap/bootstrap.sh b/scripts/bootstrap.sh
similarity index 100%
rename from example_configs/bootstrap/bootstrap.sh
rename to scripts/bootstrap.sh


Test patch: