Skip to content

Commit

Permalink
feat: add geonames data files to server base image
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard committed Nov 24, 2023
1 parent d1092eb commit 4627d6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ RUN apt-get update && \
wget \
zlib1g

COPY bin/* .
COPY bin/* ./
RUN ./build-libraw.sh
RUN ./build-imagemagick.sh
RUN ./build-libvips.sh

FROM node:20.9-bookworm-slim as prod
ADD https://download.geonames.org/export/dump/cities500.zip /usr/src/resources/cities500.zip
ADD https://download.geonames.org/export/dump/admin1CodesASCII.txt /usr/src/resources/admin1CodesASCII.txt
ADD https://download.geonames.org/export/dump/admin2Codes.txt /usr/src/resources/admin2Codes.txt

WORKDIR /usr/src/app
RUN unzip /usr/src/resources/cities500.zip -d /usr/src/resources/ && \
rm /usr/src/resources/cities500.zip && date --iso-8601=seconds | tr -d "\n" > /usr/src/resources/geodata-date.txt

RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources
COPY bin/install-ffmpeg.sh bin/build-lock.json ./
Expand Down Expand Up @@ -79,4 +82,5 @@ RUN apt-get update && \
rm build-lock.json

COPY --from=dev /usr/local/lib/ /usr/local/lib/
COPY --from=dev /usr/src/resources/ /usr/src/resources/
RUN ldconfig /usr/local/lib

0 comments on commit 4627d6a

Please sign in to comment.