forked from mapnik/node-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.kx
44 lines (38 loc) · 1.38 KB
/
Dockerfile.kx
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
# This builds a container capable of doing a build of node-mapnik (with dependencies preinstalled via apt-get)
# In constrast to upstream build process, this dockerfile doesn't use the Mason package manager,
# so it gets a fully functional GDAL with curl support, and doesn't need to build GDAL from source.
#
FROM ubuntu:focal
LABEL org.opencontainers.image.authors="[email protected]"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -q
RUN /bin/bash -c "apt-get install -qy \
build-essential \
gettext \
git-core \
make \
ssh \
python3-pip"
RUN /bin/bash -c "apt-get install -qy \
libmapnik-dev \
libproj-dev \
libgdal-dev \
libgeotiff-dev"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
ARG NODE_VERSION
ENV NODE_VERSION=${NODE_VERSION}
# oh wow it's REALLY hard to get nvm working in a dockerfile (!)
RUN bash -c ". /root/.nvm/nvm.sh && nvm install '${NODE_VERSION}'"
RUN ln -s /root/.nvm/versions/node/v*/bin/node /usr/bin/node \
&& ln -s /root/.nvm/versions/node/v*/bin/npm /usr/bin/npm
RUN node --version
RUN echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
# NOTE: Populate all these for publishing!
ENV NPM_TOKEN=
ENV AWS_ACCESS_KEY_ID=
ENV AWS_SECRET_ACCESS_KEY=
# for publishing
ENV AWS_DEFAULT_REGION=ap-southeast-2
RUN python3 -m pip install awscli
VOLUME /src
WORKDIR /src