File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : publishpublish
2
+ run-name : ${{ github.actor }} build new image
3
+ on : [push]
4
+ jobs :
5
+ publish-postgres-image :
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - uses : actions/checkout@v2
9
+ - uses : docker/login-action@v1
10
+ with :
11
+ registry : ghcr.io
12
+ username : ${{ github.actor }}
13
+ password : ${{ secrets.GITHUB_TOKEN }}
14
+ - name : Build the Postgres 13 Docker image
15
+ run : |
16
+ timetag=(`date +%Y%M%d`)
17
+ docker build . --tag ghcr.io/viraweb123/docker-postgres:13.${timetag} --tag ghcr.io/viraweb123/docker-postgres:13
18
+ docker push ghcr.io/viraweb123/docker-postgres:13
19
+ docker push ghcr.io/viraweb123/docker-postgres:13.${timetag}
Original file line number Diff line number Diff line change
1
+ FROM postgres:13
2
+
3
+ # Install PostGIS
4
+ RUN apt-get update \
5
+ && apt-get install -y \
6
+ postgresql-13-postgis-3 \
7
+ postgresql-13-postgis-3-scripts \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Create the PostGIS extension
11
+ RUN mkdir -p "/docker-entrypoint-initdb.d" \
12
+ && echo "CREATE EXTENSION IF NOT EXISTS postgis;" > /docker-entrypoint-initdb.d/postgis_o125.sql
You can’t perform that action at this time.
0 commit comments