From d30f521399bc009aa64a6ab84cfb8a85a7008d64 Mon Sep 17 00:00:00 2001 From: Peng Peng Date: Sat, 29 Jun 2024 22:25:45 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 63 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 035def427..23f191bbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,34 +13,34 @@ RUN cargo build --release -p lldap # Final image FROM ubuntu:22.04 -ENV GOSU_VERSION 1.14 -# Fetch gosu from git -RUN set -eux; \ - \ - apk add --no-cache --virtual .gosu-deps \ - ca-certificates \ - dpkg \ - gnupg \ - ; \ - \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - \ -# verify the signature - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - \ -# clean up fetch dependencies - apk del --no-network .gosu-deps; \ - \ - chmod +x /usr/local/bin/gosu; \ -# verify that the binary works - gosu --version; \ - gosu nobody true +#ENV GOSU_VERSION 1.14 +## Fetch gosu from git +#RUN set -eux; \ +# \ +# apk add --no-cache --virtual .gosu-deps \ +# ca-certificates \ +# dpkg \ +# gnupg \ +# ; \ +# \ +# dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ +# wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ +# wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ +# \ +## verify the signature +# export GNUPGHOME="$(mktemp -d)"; \ +# gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ +# gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ +# command -v gpgconf && gpgconf --kill all || :; \ +# rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ +# \ +## clean up fetch dependencies +# apk del --no-network .gosu-deps; \ +# \ +# chmod +x /usr/local/bin/gosu; \ +## verify that the binary works +# gosu --version; \ +# gosu nobody true WORKDIR /app @@ -62,6 +62,7 @@ ENV HTTP_PORT=17170 EXPOSE ${LDAP_PORT} ${HTTP_PORT} -ENTRYPOINT ["/app/docker-entrypoint.sh"] -CMD ["run", "--config-file", "/data/lldap_config.toml"] -HEALTHCHECK CMD ["/app/lldap", "healthcheck", "--config-file", "/data/lldap_config.toml"] \ No newline at end of file +ENTRYPOINT ["lldap","run"] +#ENTRYPOINT ["/app/docker-entrypoint.sh"] +#CMD ["run", "--config-file", "/data/lldap_config.toml"] +#HEALTHCHECK CMD ["/app/lldap", "healthcheck", "--config-file", "/data/lldap_config.toml"] \ No newline at end of file