extend labels, added git
This commit is contained in:
parent
c3f0b11a7f
commit
e0dc27bf8c
2 changed files with 14 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
BUILDER := docker buildx
|
BUILDER := docker buildx
|
||||||
|
TAG := git.schmidl.dev/schtobia/buildimage
|
||||||
|
|
||||||
build: dockerfile
|
build: dockerfile
|
||||||
@${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --tags --always --dirty) -t buildimage .
|
@${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --always) --build-arg=VERSION=$(shell git describe --tags --always --dirty) --build-arg=TIMESTAMP="$(shell date -u -Iseconds)" -t ${TAG} .
|
||||||
|
|
13
dockerfile
13
dockerfile
|
@ -6,12 +6,23 @@ FROM debian:stable-slim
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ARG GIT_COMMIT
|
ARG GIT_COMMIT
|
||||||
|
ARG VERSION
|
||||||
|
ARG TIMESTAMP
|
||||||
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
||||||
org.opencontainers.image.base.name="docker.io/debian:stable-slim" \
|
org.opencontainers.image.base.name="docker.io/debian:stable-slim" \
|
||||||
org.opencontainers.image.title=buildimage
|
org.opencontainers.image.title=buildimage \
|
||||||
|
org.opencontainers.image.source="https://git.schmidl.dev/schtobia/buildimage" \
|
||||||
|
org.opencontainers.image.url="https://git.schmidl.dev/schtobia/buildimage"
|
||||||
|
|
||||||
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
|
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
|
||||||
|
LABEL org.opencontainers.image.version=${VERSION}
|
||||||
|
LABEL org.opencontainers.image.created=${TIMESTAMP}
|
||||||
|
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt install --assume-yes --no-install-recommends \
|
&& apt install --assume-yes --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
git \
|
||||||
&& find /var/lib/apt -type f -delete
|
&& find /var/lib/apt -type f -delete
|
||||||
|
|
||||||
|
VOLUME /workdir
|
||||||
|
WORKDIR /workdir
|
||||||
|
|
Loading…
Reference in a new issue