Skip to content

Instantly share code, notes, and snippets.

View peetw's full-sized avatar

Peet Whittaker peetw

View GitHub Profile
@peetw
peetw / Dockerfile
Last active January 24, 2024 16:01
Dockerfile for PostgreSQL 9.6 server on Windows
# This Dockerfile sets up a PostgreSQL 9.6 server
# Adapted from: https://github.com/StefanScherer/dockerfiles-windows/blob/master/postgres/Dockerfile
FROM microsoft/windowsservercore@sha256:c06b4bfaf634215ea194e6005450740f3a230b27c510cf8facab1e9c678f3a99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN [Net.ServicePointManager]::SecurityProtocol = 'Tls12, Tls11, Tls' ; \
Invoke-WebRequest -UseBasicParsing -Uri 'https://get.enterprisedb.com/postgresql/postgresql-9.6.10-2-windows-x64.exe' -OutFile 'postgresql-installer.exe' ; \
Start-Process postgresql-installer.exe -ArgumentList '--mode unattended --superpassword password' -Wait ; \
Remove-Item postgresql-installer.exe -Force