19.03 works, scaffolding started for more versions.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
af0e5a298b
commit
57d0925a21
@ -1,5 +1,7 @@
|
||||
# FROM docker:dind
|
||||
FROM docker:19.03-dind
|
||||
ARG DOCKER_VERSION=19.03
|
||||
ARG BASE_IMAGE_TAG=$DOCKER_VERSION-dind
|
||||
|
||||
FROM docker:$BASE_IMAGE_TAG
|
||||
|
||||
RUN apk add --no-cache \
|
||||
make
|
||||
|
||||
@ -1,21 +1,41 @@
|
||||
default: build
|
||||
default: 19.03
|
||||
|
||||
DATE = $(shell date +%F)
|
||||
SHORT_COMMIT_HASH = $(shell git log -1 --format=%h)
|
||||
IMAGE_NAME := shnee/dind
|
||||
DOCKER_VERSION = ""
|
||||
|
||||
build:
|
||||
docker build . -t shnee/dind:latest
|
||||
DATE := $(shell date +%F)
|
||||
SHORT_COMMIT_HASH := $(shell git log -1 --format=%h)
|
||||
|
||||
tag:
|
||||
docker tag shnee/dind:latest shnee/dind:$(DATE)-$(SHORT_COMMIT_HASH)
|
||||
UNIQUE_TAG = $(DOCKER_VERSION)-$(DATE)-$(SHORT_COMMIT_HASH)
|
||||
|
||||
clean: rm-unique
|
||||
-docker rmi shnee/dind:latest
|
||||
# When using 20.10 there is an issue when running on hosts with older versions
|
||||
# of docker, runc, and libseccomp. See
|
||||
# https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
|
||||
# for info on the issue. So to avoid the bug we're using an older version,
|
||||
# 19.03.
|
||||
build: 19.03
|
||||
# TODO See if we can keep this makefile generic and have an include directory
|
||||
# for specific stuff.
|
||||
19.03: 19.03-vars docker-build
|
||||
|
||||
rm-unique:
|
||||
-docker rmi shnee/dind:$(DATE)-$(SHORT_COMMIT_HASH)
|
||||
19.03-clean: 19.03-vars docker-rm
|
||||
|
||||
19.03-vars:
|
||||
$(eval DOCKER_VERSION = 19.03)
|
||||
$(eval DOCKER_TAG = 19.03)
|
||||
|
||||
docker-build:
|
||||
docker build . \
|
||||
-t $(IMAGE_NAME):$(DOCKER_TAG)
|
||||
|
||||
clean: clean-all
|
||||
clean-all: 19.03-clean
|
||||
|
||||
docker-rm:
|
||||
docker rmi $(IMAGE_NAME):$(DOCKER_TAG)
|
||||
|
||||
help:
|
||||
@echo TODO REM do me.
|
||||
|
||||
.PHONY: default build tag clean rm-unique help
|
||||
.PHONY: 19.03 19.03-clean 19.03-vars
|
||||
.PHONY: default build tag clean clean-all docker-rm help
|
||||
|
||||
Loading…
Reference in New Issue