Skip to content

Commit

Permalink
Using multistage build to fasten up
Browse files Browse the repository at this point in the history
  • Loading branch information
alaxalves committed Apr 14, 2020
1 parent 7aa8ce7 commit 60af4ea
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Debian base
FROM debian:buster

FROM ruby:2.4.6-slim-buster as main-image
MAINTAINER Sebastian Silva <sebastian@fuentelibre.org>

FROM python:2.7 as gdal-builder

# Install the application.
RUN apt-get update -qq && apt-get install -y gdal-bin ruby imagemagick ruby-sinatra ruby-kramdown ruby-nokogiri bundler git python-gdal
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
gdal-bin \
python-gdal

FROM main-image

COPY --from=gdal-builder /usr/share /usr/share
COPY --from=gdal-builder /usr/bin /usr/bin

RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
git \
imagemagick

# Configure ImageMagick
COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml
Expand Down

0 comments on commit 60af4ea

Please sign in to comment.