This commit is contained in:
parent
a25ad8d302
commit
e3962a74db
20
Dockerfile
20
Dockerfile
@ -1,17 +1,29 @@
|
||||
FROM docker.io/library/golang:1.21.6-alpine3.18
|
||||
FROM docker.io/library/golang:1.21.6-alpine3.18 as build
|
||||
|
||||
ARG VERSION
|
||||
|
||||
COPY ./ /workspace
|
||||
|
||||
RUN cd /workspace && \
|
||||
VERSION=${VERSION} \
|
||||
make all
|
||||
WORKDIR /workspace
|
||||
|
||||
RUN set -ex && \
|
||||
apk update && \
|
||||
apk add git make && \
|
||||
make all VERSION=${VERSION}
|
||||
|
||||
# TARGET
|
||||
# =====================================================================
|
||||
FROM docker.io/library/alpine:3.19
|
||||
|
||||
ARG VERSION=latest
|
||||
|
||||
LABEL org.opencontainers.image.authors="Markus Pesch" \
|
||||
org.opencontainers.image.description="Return network interface names" \
|
||||
org.opencontainers.image.documentation="https://git.cryptic.systems/volker.raschek/getidev#getidev" \
|
||||
org.opencontainers.image.title="getidev" \
|
||||
org.opencontainers.image.vendor="Markus Pesch" \
|
||||
org.opencontainers.image.version="${VERSION}"
|
||||
|
||||
COPY --from=build /workspace/getidev /usr/bin/getidev
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/getidev" ]
|
||||
|
6
Makefile
6
Makefile
@ -5,8 +5,8 @@ VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEA
|
||||
CONTAINER_RUNTIME?=$(shell which podman)
|
||||
|
||||
# CONTAINER_IMAGE
|
||||
CONTAINER_IMAGE_REGISTRY_HOST?=docker.io
|
||||
CONTAINER_IMAGE_REPOSITORY=volkerraschek/getidev
|
||||
CONTAINER_IMAGE_REGISTRY_HOST?=git.cryptic.systems
|
||||
CONTAINER_IMAGE_REPOSITORY=volker.raschek/getidev
|
||||
CONTAINER_IMAGE_VERSION?=latest
|
||||
CONTAINER_IMAGE_FULLY_QUALIFIED=${CONTAINER_IMAGE_REGISTRY_HOST}/${CONTAINER_IMAGE_REPOSITORY}:${CONTAINER_IMAGE_VERSION}
|
||||
|
||||
@ -24,7 +24,7 @@ getidev:
|
||||
# ==============================================================================
|
||||
PHONY+=clean
|
||||
clean:
|
||||
rm --force --recursive $(shell pwd)/getidev*
|
||||
rm -f -r $(shell pwd)/getidev*
|
||||
|
||||
# GOLANGCI-LINT
|
||||
# ==============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user