19.03 works, scaffolding started for more versions.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,6 +5,11 @@ name: docker-build
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker build
|
- name: docker build
|
||||||
|
# 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.
|
||||||
image: shnee/dind
|
image: shnee/dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
|
|||||||
+4
-2
@@ -1,5 +1,7 @@
|
|||||||
# FROM docker:dind
|
ARG DOCKER_VERSION=19.03
|
||||||
FROM docker:19.03-dind
|
ARG BASE_IMAGE_TAG=$DOCKER_VERSION-dind
|
||||||
|
|
||||||
|
FROM docker:$BASE_IMAGE_TAG
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
make
|
make
|
||||||
|
|||||||
@@ -1,21 +1,41 @@
|
|||||||
default: build
|
default: 19.03
|
||||||
|
|
||||||
DATE = $(shell date +%F)
|
IMAGE_NAME := shnee/dind
|
||||||
SHORT_COMMIT_HASH = $(shell git log -1 --format=%h)
|
DOCKER_VERSION = ""
|
||||||
|
|
||||||
build:
|
DATE := $(shell date +%F)
|
||||||
docker build . -t shnee/dind:latest
|
SHORT_COMMIT_HASH := $(shell git log -1 --format=%h)
|
||||||
|
|
||||||
tag:
|
UNIQUE_TAG = $(DOCKER_VERSION)-$(DATE)-$(SHORT_COMMIT_HASH)
|
||||||
docker tag shnee/dind:latest shnee/dind:$(DATE)-$(SHORT_COMMIT_HASH)
|
|
||||||
|
|
||||||
clean: rm-unique
|
# When using 20.10 there is an issue when running on hosts with older versions
|
||||||
-docker rmi shnee/dind:latest
|
# 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:
|
19.03-clean: 19.03-vars docker-rm
|
||||||
-docker rmi shnee/dind:$(DATE)-$(SHORT_COMMIT_HASH)
|
|
||||||
|
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:
|
help:
|
||||||
@echo TODO REM do me.
|
@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
|
||||||
|
|||||||
Reference in New Issue
Block a user