Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pengpeng committed Jun 29, 2024
1 parent b6a8523 commit d30f521
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"]
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"]

0 comments on commit d30f521

Please sign in to comment.