Skip to content

Commit

Permalink
Set version via global arg
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed May 5, 2020
1 parent fe19075 commit 187906c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -43,14 +43,17 @@ RUN cd /srv \

FROM ubuntu:xenial

ARG nominatim_version

LABEL \
maintainer="Peter Evans <mail@peterevans.dev>" \
org.opencontainers.image.title="nominatim" \
org.opencontainers.image.description="Docker image for Nominatim." \
org.opencontainers.image.authors="Peter Evans <mail@peterevans.dev>" \
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
Expand Down

0 comments on commit 187906c

Please sign in to comment.