Skip to content

Instantly share code, notes, and snippets.

@herloct
Last active February 4, 2017 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save herloct/58cfa7f8de397f70d481322b002f0238 to your computer and use it in GitHub Desktop.
Save herloct/58cfa7f8de397f70d481322b002f0238 to your computer and use it in GitHub Desktop.
Dockerfile for OL-Fetish

Build Docker Image

docker build --rm --tag ol-fetish:3.20.1 .

Run Docker Image

docker run --rm \                                                                      
  --user $(id -u):$(id -g) \
  --volume $(pwd):/build \
  ol-fetish:3.20.1 <config> <output>

Example

docker run --rm \                                                                     
  --user $(id -u):$(id -g) \
  --volume $(pwd):/build \
  ol-fetish:3.20.1 ol-custom.json ol-custom.js
FROM alpine:3.5
ENV OPENLAYERS_VERSION=3.20.1
RUN apk update --no-cache \
&& apk add --no-cache \
nodejs \
openjdk8 \
&& mkdir -p /openlayers \
&& cd /openlayers \
&& npm install openlayers@$OPENLAYERS_VERSION \
&& chmod -R 0777 /openlayers
WORKDIR /build
VOLUME ["/build"]
ENTRYPOINT ["node", "/openlayers/node_modules/openlayers/tasks/build.js"]
CMD ["--help"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment