Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
community
docker
Commits
134964c7
Commit
134964c7
authored
Apr 23, 2019
by
Dmitrii Scurtu
Browse files
added dockerfile for postgis image
parents
Pipeline
#13775
failed with stage
in 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
134964c7
stages
:
-
build_postgis
build_image_postgis
:
image
:
docker:stable-git
stage
:
build_postgis
variables
:
DOCKER_HOST
:
tcp://docker:2375/
DOCKER_DRIVER
:
overlay2
services
:
-
docker:dind
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN git.steelkiwi.com:5005
script
:
-
echo "$IMAGE:$CI_JOB_ID" > images
-
docker build --cache-from $IMAGE:cache -t $IMAGE:latest -f postgis/Dockerfile_develop .
-
docker push $IMAGE:latest
only
:
-
postgis
tags
:
-
django_tests
\ No newline at end of file
postgis/Dockerfile
0 → 100644
View file @
134964c7
FROM
postgres:10-alpine
MAINTAINER
SteelKiwi Inc.
ENV
POSTGIS_VERSION 2.5.2
RUN
set
-ex
&&
apk
--update
add
--no-cache
\
--repository
http://dl-cdn.alpinelinux.org/alpine/edge/testing
\
--virtual
.packages
\
make
\
geos-dev
\
proj4-dev
\
gdal-dev
\
json-c-dev
\
g++
\
perl
\
libxml2-dev
RUN
set
-ex
&&
mkdir
/tmp/postgis
\
&&
wget
-O
postgis.tar.gz
"https://download.osgeo.org/postgis/source/postgis-
$POSTGIS_VERSION
.tar.gz"
\
&&
tar
--extract
\
--file
postgis.tar.gz
\
--directory
/tmp/postgis
\
--strip-components
1
\
&&
rm
postgis.tar.gz
\
&&
cd
/tmp/postgis
\
&&
./configure
\
&&
make
\
&&
make
install
\
&&
rm
-rf
/tmp/postgis
\
&&
apk del .packages
RUN
set
-ex
&&
apk add
--no-cache
\
--repository
http://dl-cdn.alpinelinux.org/alpine/edge/testing
\
geos
\
proj4
\
gdal
\
json-c
\
libxml2
COPY
./postgis.sh /docker-entrypoint-initdb.d/postgis.sh
\ No newline at end of file
postgis/postgis.sh
0 → 100644
View file @
134964c7
#!/usr/bin/env sh
set
-e
export
PGUSER
=
"
$POSTGRES_USER
"
psql
<<-
EOSQL
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
EOSQL
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment