Skip to content

Modern Docker Management, Designed for Everyone

chore: update dockerfile with labels

Kyle Mendellcc239556f404
diff --git a/.revision b/.revision
new file mode 100644
index 000000000..9c9340103
--- /dev/null
+++ b/.revision
@@ -0,0 +1 @@
+1e6da7d
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 79add31b9..58e4c194a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -54,7 +54,21 @@ RUN npm install --omit=dev && \
# Configure container
EXPOSE 3000
VOLUME ["/app/data"]
-LABEL org.opencontainers.image.authors="kmendell"
+
+ARG VERSION="0.3.0"
+ARG REVISION="1e6da7d"
+
+# Add OCI standard labels (reading version/revision from files)
+LABEL org.opencontainers.image.authors="OFKM Technologies"
+LABEL org.opencontainers.image.url="https://github.com/ofkm/arcane"
+LABEL org.opencontainers.image.documentation="https://github.com/ofkm/arcane/blob/main/README.md"
+LABEL org.opencontainers.image.source="https://github.com/ofkm/arcane"
+LABEL org.opencontainers.image.version=$VERSION
+LABEL org.opencontainers.image.revision=$REVISION
+LABEL org.opencontainers.image.licenses="BSD-3-Clause"
+LABEL org.opencontainers.image.ref.name="arcane"
+LABEL org.opencontainers.image.title="Arcane"
+LABEL org.opencontainers.image.description="Simple and Elegant Docker Management UI written in Typescript and SvelteKit"
# Set the entrypoint and command
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff --git a/scripts/development/create-release.sh b/scripts/development/create-release.sh
index af396a489..e6f4492c6 100755
--- a/scripts/development/create-release.sh
+++ b/scripts/development/create-release.sh
@@ -74,6 +74,22 @@ git add .version
jq --arg new_version "$NEW_VERSION" '.version = $new_version' package.json >package_tmp.json && mv package_tmp.json package.json
git add package.json
+# Create/Update .revision file with the latest commit short hash
+echo "Creating/Updating .revision file..."
+LATEST_REVISION=$(git rev-parse --short HEAD)
+echo "$LATEST_REVISION" > .revision
+git add .revision
+
+# Update default ARG VERSION in Dockerfile
+echo "Updating Dockerfile ARG VERSION..."
+sed -i.bak "s/^ARG VERSION=.*$/ARG VERSION=\"$NEW_VERSION\"/" Dockerfile && rm Dockerfile.bak
+git add Dockerfile
+
+# Update default ARG REVISION in Dockerfile
+echo "Updating Dockerfile ARG REVISION..."
+sed -i.bak "s/^ARG REVISION=.*$/ARG REVISION=\"$LATEST_REVISION\"/" Dockerfile && rm Dockerfile.bak
+git add Dockerfile
+
# Check if conventional-changelog is installed, if not install it
if ! command -v conventional-changelog &>/dev/null; then
echo "conventional-changelog not found, installing..."