-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from vk496/develop
Optimize Dockerfile with Alpine
- Loading branch information
Showing
1 changed file
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|