Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,26 @@ ARG wal_g_release=2.0.1

FROM ubuntu:focal as base

RUN apt update -y && apt install -y \

ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
TZ=Etc/UTC

# Pre-configure tzdata before any installations
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y --no-install-recommends tzdata && \
apt-get install -y \
curl \
gnupg \
lsb-release \
software-properties-common \
wget \
sudo \
&& apt clean
git \
&& apt clean && \
rm -rf /var/lib/apt/lists/*


RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres
Expand Down Expand Up @@ -102,12 +114,6 @@ RUN chown -R postgres:postgres /usr/lib/postgresql
RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets


RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata

RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
Expand Down
23 changes: 14 additions & 9 deletions Dockerfile-16
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,25 @@ ARG wal_g_release=2.0.1

FROM ubuntu:focal as base

RUN apt update -y && apt install -y \
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
TZ=Etc/UTC

# Pre-configure tzdata before any installations
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y --no-install-recommends tzdata && \
apt-get install -y \
curl \
gnupg \
lsb-release \
software-properties-common \
wget \
sudo \
&& apt clean
git \
&& apt clean && \
rm -rf /var/lib/apt/lists/*


RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres
Expand Down Expand Up @@ -101,13 +112,7 @@ RUN chown -R postgres:postgres /usr/lib/postgresql

RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets


RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata

RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata


RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
Expand Down
7 changes: 4 additions & 3 deletions ansible/tasks/stage2-setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src"
when: stage2_nix

- name: Install Git for Nix package management
- name: Remove Git after Nix package installations
become: yes
apt:
name: git
state: present
update_cache: yes
state: absent
autoremove: yes
purge: yes
when: stage2_nix

- name: Set ownership and permissions for /etc/ssl/private
Expand Down
3 changes: 2 additions & 1 deletion nix/ext/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
, darwin
, jq
, rust-bin
, git
}:
let
rustVersion = "1.80.0";
Expand All @@ -29,7 +30,7 @@ buildPgrxExtension_0_12_6 rec {
};

nativeBuildInputs = [ pkg-config cargo ];
buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [
buildInputs = [ openssl postgresql git ] ++ lib.optionals (stdenv.isDarwin) [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
Expand Down
Loading