Skip to content

Commit

Permalink
Add OCI labels to docker images
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Login <batazor@evrone.com>
  • Loading branch information
batazor committed Mar 28, 2023
1 parent a871be9 commit 626590b
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ops/dockerfile/backstage.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \
# Stage 3 - Build the actual backend image and install production dependencies
FROM node:19-bullseye-slim

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="Backstage"
LABEL org.opencontainers.image.description="Backstage"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"


# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/bot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ RUN mvn -f /app/pom.xml clean package

FROM openjdk:21-ea-13-jdk-slim

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-bot"
LABEL org.opencontainers.image.description="shortlink-bot"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Install dependencies
RUN \
apt update && \
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/csi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

FROM alpine:3.17

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-csi"
LABEL org.opencontainers.image.description="shortlink-csi"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Define GOTRACEBACK to mark this container as using the Go language runtime
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
ENV GOTRACEBACK=all
Expand Down
10 changes: 10 additions & 0 deletions ops/dockerfile/go.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

FROM alpine:3.17

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-${CMD_PATH}"
LABEL org.opencontainers.image.description="shortlink-${CMD_PATH}"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"
LABEL org.opencontainers.image.revision=$CI_COMMIT_SHA

# Define GOTRACEBACK to mark this container as using the Go language runtime
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
ENV GOTRACEBACK=all
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/landing.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ RUN npm run generate
# Production image, copy all the files and run next
FROM nginxinc/nginx-unprivileged:1.23-alpine

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-landing"
LABEL org.opencontainers.image.description="shortlink-landing"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Delete default config
RUN rm /etc/nginx/conf.d/default.conf

Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/proxy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ ARG BUILDKIT_SBOM_SCAN_CONTEXT=true

FROM node:19.8-alpine as builder

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-proxy"
LABEL org.opencontainers.image.description="shortlink-proxy"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# WARNING: if container limit < MAX_OLD_SPACE_SIZE => Killed
# Docs: https://developer.ibm.com/languages/node-js/articles/nodejs-memory-management-in-container-environments/
ARG MAX_OLD_SPACE_SIZE=8192
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/referral.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.t
# Final image
FROM python:3.11-slim

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-referral"
LABEL org.opencontainers.image.description="shortlink-referral"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Install dependencies
RUN \
apk update && \
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/shortdb.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

FROM debian:11.6

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortdb"
LABEL org.opencontainers.image.description="ShortLink Database"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Define GOTRACEBACK to mark this container as using the Go language runtime
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
ENV GOTRACEBACK=all
Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/ui-kit.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ RUN npm run build-storybook
# Production image, copy all the files and run next
FROM nginxinc/nginx-unprivileged:1.23-alpine

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="ui-kit"
LABEL org.opencontainers.image.description="UI Kit"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Delete default config
RUN rm /etc/nginx/conf.d/default.conf

Expand Down
9 changes: 9 additions & 0 deletions ops/dockerfile/ui-next.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ RUN npm run generate
# Production image, copy all the files and run next
FROM nginxinc/nginx-unprivileged:1.23-alpine

LABEL maintainer=batazor111@gmail.com
LABEL org.opencontainers.image.title="shortlink-next"
LABEL org.opencontainers.image.description="shortlink-next"
LABEL org.opencontainers.image.authors="Login Viktor @batazor"
LABEL org.opencontainers.image.vendor="Login Viktor @batazor"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="http://shortlink.best/"
LABEL org.opencontainers.image.source="https://github.com/shortlink-org/shortlink"

# Delete default config
RUN rm /etc/nginx/conf.d/default.conf

Expand Down

0 comments on commit 626590b

Please sign in to comment.