automatically tag docker image based on hugo version and dockerfile version
parent
d392c135b2
commit
df7b5416e6
|
@ -4,6 +4,11 @@
|
|||
# change is that the Hugo version is now an overridable argument rather than a fixed
|
||||
# environment variable.
|
||||
|
||||
# Bump this by 1 whenever you change the Dockerfile below, e.g. if
|
||||
# `DOCKERFFILE_VERSION=1` then change this to `DOCKERFILE_VERSION=2` when you
|
||||
# change something else in this file.
|
||||
# DOCKERFILE_VERSION=0
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"
|
||||
|
|
3
Makefile
3
Makefile
|
@ -6,7 +6,8 @@ NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda
|
|||
# but this can be overridden when calling make, e.g.
|
||||
# CONTAINER_ENGINE=podman make container-image
|
||||
CONTAINER_ENGINE ?= docker
|
||||
CONTAINER_IMAGE = kubernetes-hugo
|
||||
DOCKERFILE_VERSION = $(shell grep DOCKERFILE_VERSION Dockerfile | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n")
|
||||
CONTAINER_IMAGE = kubernetes-hugo:v$(HUGO_VERSION)-$(DOCKERFILE_VERSION)
|
||||
CONTAINER_RUN = $(CONTAINER_ENGINE) run --rm --interactive --tty --volume $(CURDIR):/src
|
||||
|
||||
CCRED=\033[0;31m
|
||||
|
|
Loading…
Reference in New Issue