Skip to content

Commit

Permalink
Merge pull request #41 from vk496/develop
Browse files Browse the repository at this point in the history
Optimize Dockerfile with Alpine
  • Loading branch information
jcabala14 authored Jan 23, 2018
2 parents 66b98dd + 129689c commit 7c21506
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
FROM ubuntu

# Set the locale
RUN apt-get clean && apt-get update && apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
FROM mhart/alpine-node

ENV HOME /root
ENV SECRET_KEY no-secret-key #Set a secure Django secret key for production!
ENV LIBRARY_PATH=/lib:/usr/lib

WORKDIR $HOME
COPY requirements.txt bower.json .bowerrc $HOME/

RUN apk add --update \
build-base \
git \
python3 \
python3-dev py3-pip jpeg-dev zlib-dev \
&& npm install -g [email protected] topojson ogr2ogr \
&& pip3 install --upgrade pip \
&& rm /var/cache/apk/*

## ENVRIOMENT DEPENDENCIES
RUN apt-get update && \
apt-get install -y -q libtiff5-dev libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk python3-pip python3-dev nodejs-legacy npm git && \
pip3 install --upgrade pip && \
npm install -g topojson ogr2ogr && \
npm install -g [email protected] && \
pip3 install -r requirements.txt && \
bower install --allow-root
COPY requirements.txt $HOME/
RUN pip3 install -r requirements.txt

COPY bower.json .bowerrc $HOME/
RUN bower install --allow-root

## COPY PROJECT
COPY . $HOME
Expand Down

0 comments on commit 7c21506

Please sign in to comment.