-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
45 lines (33 loc) · 963 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM postgres:16
RUN apt-get update && apt-get upgrade -y
ENV build_deps ca-certificates \
git \
build-essential \
libpq-dev \
postgresql-server-dev-14 \
curl \
libreadline6-dev \
zlib1g-dev
RUN apt-get install -y --no-install-recommends $build_deps pkg-config cmake
WORKDIR /home/spa5k
ENV HOME=/home/spa5k \
PATH=/home/spa5k/.cargo/bin:$PATH
RUN chown postgres:postgres /home/spark
USER postgres
RUN \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal --default-toolchain nightly && \
rustup --version && \
rustc --version && \
cargo --version
# PGX
RUN cargo install cargo-pgrx
RUN cargo pgx init --pg16 $(which pg_config)
USER root
RUN mkdir -p /tmp/build \
&& cd /tmp/build \
&& git clone https://github.com/spa5k/uids-postgres \
&& cd uids-postgres \
&& cargo pgx install
RUN rm -fr /tmp/build \
&& apt-get clean \
&& apt-get autoremove -y $build_deps