-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by:Bart Hanssens <[email protected]>
- Loading branch information
1 parent
5ec142c
commit 6b60988
Showing
1 changed file
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,42 @@ | ||
# Dropwizard org.belgif.be | ||
FROM amd64/openjdk:11-jre-slim | ||
MAINTAINER Bart Hanssens <[email protected]> | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS temp | ||
|
||
RUN adduser --system cbe | ||
COPY target/cbe-proxy-1.4-runner.jar /usr/local/bin/cbe-proxy.jar | ||
RUN curl -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \ | ||
chmod +x /usr/local/bin/dumb-init | ||
|
||
USER cbe | ||
WORKDIR /home/cbe | ||
FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.12 | ||
|
||
CMD java -server -Dhttp.proxyHost=dc-proxy.names.belgium.be -Dhttp.proxyPort=3128 -Dhttps.proxyHost=dc-proxy.names.belgium.be -Dhttps.proxyPort=3128 -jar /usr/local/bin/cbe-proxy.jar | ||
LABEL org.opencontainers.image.authors="Bart Hanssens <[email protected]>" \ | ||
io.k8s.display-name="CBE LOD Proxy" \ | ||
org.opencontainers.image.title="CBE LOD Proxy" \ | ||
io.k8s.description="Linked open data proxy for Crossroadbank Enterprises, based on RedHat UBI 8 with OpenJDK JRE 17." \ | ||
org.opencontainers.image.description="Linked open data proxy for Crossroadbank Enterprises, based on RedHat UBI 8 with OpenJDK JRE 17" \ | ||
org.opencontainers.image.documentation="https://github.com/Fedict/lod-cbe/tree/master/cbetools-proxy#readme" \ | ||
org.opencontainers.image.licenses="Copyright (C) 2022 FPS BOSA." \ | ||
org.opencontainers.image.source="https://github.com/Fedict/lod-cbe/tree/master/cbetools-proxy" \ | ||
io.openshift.tags="bosa, lod, CBE" \ | ||
io.openshift.min-cpu="1" \ | ||
io.openshift.min-memory="400Mi" \ | ||
io.openshift.non-scalable="true" \ | ||
io.openshift.wants="" | ||
|
||
USER root | ||
|
||
RUN echo 'nonroot:x:1949000151:0:non-root user:/home/nonroot:/sbin/nologin' >> /etc/passwd && \ | ||
mkdir /home/nonroot && \ | ||
chgrp -R 0 /home/nonroot && \ | ||
chmod -R g=u /home/nonroot | ||
|
||
COPY --from=temp /usr/local/bin/dumb-init /usr/local/bin/dumb-init | ||
COPY cbetools-proxy-*.jar /home/nonroot/cbetools-proxy.jar | ||
|
||
WORKDIR /home/nonroot | ||
|
||
USER nonroot | ||
|
||
WORKDIR /home/nonroot | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["java", "-jar", "/home/nonroot/cbetools-proxy.jar" ] | ||
|
||
EXPOSE 8080 | ||
|