Skip to content

Commit

Permalink
Merge pull request #28 from peter-evans/update-nominatim
Browse files Browse the repository at this point in the history
Update nominatim
  • Loading branch information
peter-evans authored May 5, 2020
2 parents 5f373fd + dba12ab commit f2f0cec
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
14 changes: 10 additions & 4 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 All @@ -62,15 +66,17 @@ jobs:
command: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG/v/''}
APP_TAG=$(docker inspect $IMAGE_NAME:latest | jq -r '. | first | .ContainerConfig.Labels."app.tag"')
docker tag $IMAGE_NAME:latest $IMAGE_NAME:latest-$APP_TAG
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$IMAGE_TAG
# If the minor version can be extracted then tag and push
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG-$APP_TAG
# If the minor version can be extracted then tag
MINOR_VERSION=$(echo $CIRCLE_TAG | sed -n "s/^v\([0-9]*.[0-9]*\).[0-9]*$/\1/p")
if [[ ${#MINOR_VERSION} -gt 0 ]]; then
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$MINOR_VERSION
docker push $IMAGE_NAME:$MINOR_VERSION
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$MINOR_VERSION-$APP_TAG
fi
docker push $IMAGE_NAME
workflows:
version: 2
build:
Expand Down
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG nominatim_version=3.4.2

FROM peterevans/xenial-gcloud:1.2.23 as builder

ENV NOMINATIM_VERSION 3.4.1
ARG nominatim_version

# Let the container know that there is no TTY
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -28,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 @@ -41,14 +43,17 @@ RUN cd /srv \

FROM peterevans/xenial-gcloud:1.2.23

ARG nominatim_version

LABEL \
maintainer="Peter Evans <[email protected]>" \
org.opencontainers.image.title="nominatim-k8s" \
org.opencontainers.image.description="Nominatim for Kubernetes on Google Container Engine (GKE)." \
org.opencontainers.image.authors="Peter Evans <[email protected]>" \
org.opencontainers.image.url="https://github.com/peter-evans/nominatim-k8s" \
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
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ This Docker image and sample Kubernetes configuration files are one solution to

## Supported tags and respective `Dockerfile` links

- [`2.5.3`, `2.5`, `latest` (*2.5/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.5.3)
- [`2.5.4`, `2.5`, `latest`, `2.5.4-nominatim3.4.2`, `2.5-nominatim3.4.2`, `latest-nominatim3.4.2` (*2.5/Dockerfile*)](https://github.com/peter-evans/nominatim-docker/tree/v2.5.4)
- [`2.5.3` (*2.5/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.5.3)
- [`2.4.0`, `2.4` (*2.4/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.4.0)
- [`2.3.3`, `2.3` (*2.3/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.3.3)
- [`2.2.0`, `2.2` (*2.2/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.2.0)
- [`2.1.0`, `2.1` (*2.1/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.1.0)
- [`2.0.1`, `2.0` (*2.0/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v2.0.1)
- [`1.2.0`, `1.2` (*1.2/Dockerfile*)](https://github.com/peter-evans/nominatim-k8s/tree/v1.2.0)

## Usage
The Docker image can be run standalone without Kubernetes:
Expand Down

0 comments on commit f2f0cec

Please sign in to comment.