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

(maint) Switch PDB container off of Alpine #3040

Merged
merged 1 commit into from
Aug 14, 2019
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
16 changes: 10 additions & 6 deletions docker/puppetdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM clojure:lein-alpine AS builder
RUN apk add --no-cache make
FROM clojure:openjdk-8-lein AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends make
# Install only dependencies
WORKDIR /app
COPY project.clj /app/
Expand All @@ -11,8 +12,11 @@ COPY . /app
RUN lein with-profile uberjar uberjar


FROM openjdk:8-jre-alpine
RUN apk add --no-cache tini curl openssl bind-tools
FROM openjdk:8-jre-slim-buster
RUN apt-get update && \
apt-get install -y --no-install-recommends tini curl openssl dnsutils netcat && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/puppetdb.jar /

ARG vcs_ref
Expand Down Expand Up @@ -66,7 +70,7 @@ COPY resources/ext/config/logback.xml /etc/puppetlabs/puppetdb/
COPY resources/ext/config/request-logging.xml /etc/puppetlabs/puppetdb/
RUN mkdir -p /opt/puppetlabs/server/data/puppetdb

RUN addgroup $GROUP && adduser -S $USER -G $GROUP
RUN addgroup $GROUP && adduser --system $USER --ingroup $GROUP

ADD https://raw.githubusercontent.com/puppetlabs/pupperware/8cdc056be09c44ed1ba96f963d71bd074d063b17/shared/ssl.sh /ssl.sh
RUN chmod +x /ssl.sh
Expand All @@ -83,7 +87,7 @@ COPY docker/puppetdb/docker-entrypoint.d /docker-entrypoint.d

EXPOSE 8080 8081

ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/docker-entrypoint.sh"]
CMD ["services"]

COPY docker/puppetdb/healthcheck.sh /
Expand Down