This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile2204
57 lines (44 loc) · 1.61 KB
/
Dockerfile2204
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# vim:set ft=dockerfile:
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && \
apt-get install -y gcc g++ make autoconf automake libtool \
libfcgi-dev libxml2-dev libmemcached-dev \
libboost-program-options-dev libcrypto++-dev libyajl-dev \
libpqxx-dev zlib1g-dev libargon2-dev libfmt-dev \
postgresql-14 postgresql-server-dev-all \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the main application.
COPY . ./
# Compile, install and remove source
RUN ./autogen.sh && \
./configure --enable-static --disable-shared --enable-yajl CXXFLAGS="-Wall -Wextra -Wpedantic -Wno-unused-parameter" && \
make -j3 && \
make check && \
strip openstreetmap-cgimap
FROM ubuntu:22.04
RUN apt-get update -qq && \
apt-get install -y \
libfcgi-bin libmemcached11 libboost-program-options1.74.0 \
libxml2 libcrypto++8 libyajl2 libpqxx-6.4 zlib1g libargon2-1 argon2 libfmt8 \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/openstreetmap-cgimap /usr/local/bin
RUN groupadd -g 61000 cgimap && \
useradd -g 61000 -l -M -s /bin/false -u 61000 cgimap
USER cgimap
ENV CGIMAP_HOST db
ENV CGIMAP_DBNAME openstreetmap
ENV CGIMAP_USERNAME openstreetmap
ENV CGIMAP_PASSWORD openstreetmap
ENV CGIMAP_PIDFILE /dev/null
ENV CGIMAP_LOGFILE /dev/stdout
ENV CGIMAP_MEMCACHE memcached
ENV CGIMAP_RATELIMIT 204800
ENV CGIMAP_MAXDEBT 250
EXPOSE 8000
CMD ["/usr/local/bin/openstreetmap-cgimap", "--port=8000", "--instances=30"]