Skip to content

Commit

Permalink
[update] a new docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafabarmshory committed Jul 9, 2024
1 parent 54c606e commit 5f77a8e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: publishpublish
run-name: ${{ github.actor }} build new image
on: [push]
jobs:
publish-postgres-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Postgres 13 Docker image
run: |
timetag=(`date +%Y%M%d`)
docker build . --tag ghcr.io/viraweb123/docker-postgres:13.${timetag} --tag ghcr.io/viraweb123/docker-postgres:13
docker push ghcr.io/viraweb123/docker-postgres:13
docker push ghcr.io/viraweb123/docker-postgres:13.${timetag}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM postgres:13

# Install PostGIS
RUN apt-get update \
&& apt-get install -y \
postgresql-13-postgis-3 \
postgresql-13-postgis-3-scripts \
&& rm -rf /var/lib/apt/lists/*

# Create the PostGIS extension
RUN mkdir -p "/docker-entrypoint-initdb.d" \
&& echo "CREATE EXTENSION IF NOT EXISTS postgis;" > /docker-entrypoint-initdb.d/postgis_o125.sql

0 comments on commit 5f77a8e

Please sign in to comment.