From 00bda402ab958f874a200d714a847c8b9f0fe391 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Fri, 29 May 2020 20:41:42 +0100 Subject: [PATCH] fix: install sshpass for testing purposes. - also added missing build arguments for labelling --- Dockerfile | 2 ++ Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 65d4ac5..cf355f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ LABEL org.opencontainers.image.authors="Dan Anglin " \ org.opencontainers.image.title="Pleroma Ansible Playbook" \ org.opencontainers.image.description="Ansible playbook that installs, configures and customizes Pleroma on a Alpine host." +# TODO: Remove sshpass when it is possible to do so. RUN \ apk add --no-cache \ ca-certificates=20191127-r1 \ @@ -27,6 +28,7 @@ RUN \ openssl=1.1.1g-r0 \ python3=3.8.2-r0 \ bash=5.0.11-r1 \ + sshpass=1.06-r0 \ && \ apk add --no-cache --virtual .build-deps \ python3-dev=3.8.2-r0 \ diff --git a/Makefile b/Makefile index c9ca131..393b639 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ PLAYBOOK_FILE ?= "playbook.yml" DOCKERFILE = Dockerfile IMAGE_NAME ?= pleroma-ansible-playbook IMAGE_TAG ?= latest +IMAGE_DATE := $(shell date --iso-8601=seconds) DOCKER_IMAGE = $(IMAGE_NAME):$(IMAGE_TAG) PHONY: secret_key_base signing_salt vapid_private_key vapid_public_key test_modules_unit image publish pleroma @@ -36,7 +37,7 @@ test_modules_unit: @find ./library -mindepth 1 -maxdepth 1 -type f -name test_*.py | xargs python3 image: - @docker build -f $(DOCKERFILE) -t $(DOCKER_IMAGE) . + @docker build --build-arg BUILD_TAG=$(IMAGE_TAG) --build-arg BUILD_TIME=$(IMAGE_DATE) -f $(DOCKERFILE) -t $(DOCKER_IMAGE) . publish: image @docker push $(DOCKER_IMAGE)