dangerfarms / geodrf-alpine Goto Github PK
View Code? Open in Web Editor NEWDockerfile for Geodjango/django-rest-framework running on alpine linux
Dockerfile for Geodjango/django-rest-framework running on alpine linux
This is a great starting place for my own geodjango-based project. I was struggling with doing this manually for the better part of the day.
root@ubuntu-s-1vcpu-1gb-sgp1-01:~/django# cat Dockerfile
# This image provides containers that can connect to a postGIS database instance.
FROM python:3.5-alpine
ENV CFLAGS="$CFLAGS -L/lib"
ENV PYTHONUNBUFFERED 0
RUN apk update && \
apk upgrade && \
apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
bash \
binutils \
gcc \
gdal \
geos \
git \
jpeg-dev \
libffi-dev \
libpq \
linux-headers \
mailcap \
musl-dev \
proj4-dev \
postgresql \
postgresql-client \
postgresql-dev \
zlib-dev && \
rm -rf /var/cache/apk/*
RUN ln -s /usr/lib/libgeos_c.so.1 /usr/local/lib/libgeos_c.so
RUN ln -s /usr/lib/libgdal.so.20.1.3 /usr/lib/libgdal.so
RUN pip install --upgrade pip
root@ubuntu-s-1vcpu-1gb-sgp1-01:~/django# docker build -t dj:latest .
Sending build context to Docker daemon 3.584kB
Step 1/7 : FROM python:3.5-alpine
---> e6a070538ae4
Step 2/7 : ENV CFLAGS="$CFLAGS -L/lib"
---> Using cache
---> 92774845897a
Step 3/7 : ENV PYTHONUNBUFFERED 0
---> Using cache
---> c4137cab1866
Step 4/7 : RUN apk update && apk upgrade && apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ bash binutils gcc gdal geos git jpeg-dev libffi-dev libpq linux-headers mailcap musl-dev proj4-dev postgresql postgresql-client postgresql-dev zlib-dev && rm -rf /var/cache/apk/*
---> Running in a5d7cef6cf6e
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
v3.10.3-82-g09b11fefb8 [http://dl-cdn.alpinelinux.org/alpine/v3.10/main]
v3.10.3-79-gf2fada1a2a [http://dl-cdn.alpinelinux.org/alpine/v3.10/community]
OK: 10343 distinct packages available
(1/3) Upgrading sqlite-libs (3.28.0-r1 -> 3.28.0-r2)
(2/3) Upgrading busybox (1.30.1-r2 -> 1.30.1-r3)
Executing busybox-1.30.1-r3.post-upgrade
(3/3) Upgrading ssl_client (1.30.1-r2 -> 1.30.1-r3)
Executing busybox-1.30.1-r3.trigger
OK: 16 MiB in 26 packages
fetch http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
gdal (missing):
required by: world[gdal]
geos (missing):
required by: world[geos]
proj4-dev (missing):
required by: world[proj4-dev]
The command '/bin/sh -c apk update && apk upgrade && apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ bash binutils gcc gdal geos git
jpeg-dev libffi-dev libpq linux-headers mailcap musl-dev proj4-dev postgresql postgresql-client postgresql-dev zlib-dev && rm -rf /var/cache/apk/*' returned a non-zero code: 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.