Skip to content

Commit

Permalink
Add basic org.opencontainers.image metadata to Dockerfile
Browse files Browse the repository at this point in the history
 - Split RUN command into multiple ones for debugability
 - Add org.opencontainers.image metadata labels

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Aug 9, 2023
1 parent 3ca9721 commit 1f11468
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
env:
MAKEFLAGS: -j3
SOURCE_COMMIT: ${GITHUB_SHA}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -42,6 +43,7 @@ jobs:
env:
MAKEFLAGS: -j3
IMAGE_NAME: inadyn
SOURCE_COMMIT: ${GITHUB_SHA}
steps:
- uses: actions/checkout@v3
- name: Build image
Expand Down
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM alpine:latest
WORKDIR /root
COPY . ./

RUN apk --update --no-cache add --virtual .build-dependencies \
autoconf \
Expand All @@ -10,12 +12,18 @@ RUN apk --update --no-cache add --virtual .build-dependencies \
libtool \
make

WORKDIR /root
COPY . ./
RUN ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make install

RUN ./autogen.sh
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
RUN make install

FROM alpine:latest
ARG SOURCE_COMMIT
LABEL org.opencontainers.image.title="In-a-Dyn"
LABEL org.opencontainers.image.description="A dynamic DNS (DDNS) client with multiple SSL/TLS library support"
LABEL org.opencontainers.image.url="https://github.com/troglobit/inadyn"
LABEL org.opencontainers.image.licenses="GPL-2.0"
LABEL org.opencontainers.image.revision=$SOURCE_COMMIT
LABEL org.opencontainers.image.source="https://github.com/troglobit/inadyn/tree/${SOURCE_COMMIT:-master}/"

RUN apk --update --no-cache add \
ca-certificates \
Expand Down

0 comments on commit 1f11468

Please sign in to comment.