forked from mapcrafter/mapcrafter
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
54 lines (44 loc) · 1.04 KB
/
Dockerfile
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
#
# Build Image
#
FROM alpine:3.8 as builder
# Add the git repo
ADD . /git/mapcrafter
# Dependencies needed for building Mapcrafter
# (not sure how many of these are actually needed)
RUN apk add --no-cache --upgrade \
cmake \
gcc \
make \
g++ \
zlib-dev \
libpng-dev \
libjpeg-turbo-dev \
boost-dev
# Build mapcrafter from source
RUN cd /git/mapcrafter && \
mkdir -p build && cd build && \
cmake .. -DOPT_OPTIMIZE=ON -DOPT_SKIP_TESTS=ON && \
make && \
mkdir /tmp/mapcrafter && \
make DESTDIR=/tmp/mapcrafter install
#
# Final Image
#
FROM alpine:3.8
# Mapcrafter, built in previous stage
COPY --from=builder /tmp/mapcrafter/ /
COPY --from=miclav/mapcrafter-blocks /blocks /usr/local/share/mapcrafter/blocks
# Depedencies needed for running Mapcrafter
RUN apk add --no-cache --upgrade \
libpng \
libjpeg-turbo \
boost \
boost-iostreams \
boost-system \
boost-filesystem \
boost-program_options \
shadow
# Entrypoint
ADD entrypoint*.sh /
ENTRYPOINT ["/entrypoint.sh"]