From 187906c5e45a1eca1dccd74e46a6af9e11d81ee0 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 5 May 2020 11:34:30 +0900 Subject: [PATCH] Set version via global arg --- .circleci/config.yml | 4 ++++ Dockerfile | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 92864e3..d6417a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,10 @@ jobs: name: Load cached Docker image command: | docker load -i /tmp/workspace/latest.tar + - run: + name: Inspect Docker image + command: | + docker inspect $IMAGE_NAME:latest - run: name: Test Docker image command: | diff --git a/Dockerfile b/Dockerfile index ce4be04..583e437 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:xenial as builder +ARG nominatim_version=3.4.2 -ENV NOMINATIM_VERSION 3.4.2 +FROM ubuntu:xenial as builder -LABEL app.tag="nominatim$NOMINATIM_VERSION" +ARG nominatim_version # Let the container know that there is no TTY ARG DEBIAN_FRONTEND=noninteractive @@ -30,10 +30,10 @@ RUN apt-get -y update \ # Build Nominatim RUN cd /srv \ - && curl --silent -L http://www.nominatim.org/release/Nominatim-$NOMINATIM_VERSION.tar.bz2 -o v$NOMINATIM_VERSION.tar.bz2 \ - && tar xf v$NOMINATIM_VERSION.tar.bz2 \ - && rm v$NOMINATIM_VERSION.tar.bz2 \ - && mv Nominatim-$NOMINATIM_VERSION nominatim \ + && curl --silent -L http://www.nominatim.org/release/Nominatim-${nominatim_version}.tar.bz2 -o v${nominatim_version}.tar.bz2 \ + && tar xf v${nominatim_version}.tar.bz2 \ + && rm v${nominatim_version}.tar.bz2 \ + && mv Nominatim-${nominatim_version} nominatim \ && cd nominatim \ && mkdir build \ && cd build \ @@ -43,6 +43,8 @@ RUN cd /srv \ FROM ubuntu:xenial +ARG nominatim_version + LABEL \ maintainer="Peter Evans " \ org.opencontainers.image.title="nominatim" \ @@ -50,7 +52,8 @@ LABEL \ org.opencontainers.image.authors="Peter Evans " \ org.opencontainers.image.url="https://github.com/peter-evans/nominatim-docker" \ org.opencontainers.image.vendor="https://peterevans.dev" \ - org.opencontainers.image.licenses="MIT" + org.opencontainers.image.licenses="MIT" \ + app.tag="nominatim${nominatim_version}" # Let the container know that there is no TTY ARG DEBIAN_FRONTEND=noninteractive