Skip to content

Commit

Permalink
Add opencontainers labels to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Mar 13, 2024
1 parent 9c17219 commit 2a170e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
FROM openjdk:17-jdk-slim
ARG CREATED=""
ARG SOURCE=""
ARG VERSION=""
ARG BASE_IMAGE="openjdk:17-jdk-slim"
FROM ${BASE_IMAGE}

LABEL org.opencontainers.image.authors="Eclipse Foundation"\
org.opencontainers.image.created=${CREATED}\
org.opencontainers.image.source="${SOURCE}"\
org.opencontainers.image.version="${VERSION}"\
org.opencontainers.image.base.name="${BASE_IMAGE}"

### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
COPY uid_entrypoint /usr/local/bin/uid_entrypoint
Expand Down
6 changes: 5 additions & 1 deletion docker/build_infocenter_docker_img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ set -o errexit
set -o nounset
set -o pipefail

source_url="https://github.com/eclipse-simrel/help.eclipse.org/blob/main/docker/Dockerfile"
date="$(date +%FT%T%:z)"
git_tag="$(git rev-parse HEAD)"

# Parameters:
release_name=${1:-}
dockerhub_repo=eclipsecbi/eclipse-infocenter
Expand All @@ -34,6 +38,6 @@ cat <<EOF > ${tmp_dir}/startDockerInfoCenter.sh
./eclipse -nosplash -application org.eclipse.help.base.infocenterApplication -nl en -locales en -data workspace -plugincustomization plugin_customization.ini -vmargs -Xmx1024m -Dserver_port=8086
EOF

docker build -t ${dockerhub_repo}:${release_name} .
docker build --build-arg="CREATED=${date}" --build-arg="SOURCE=${source_url}" --build-arg="VERSION=${git_tag}" -t ${dockerhub_repo}:${release_name} .
docker push ${dockerhub_repo}:${release_name}
rm -rf ${tmp_dir}

0 comments on commit 2a170e3

Please sign in to comment.