forked from postgrespro/testgres
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile--std.tmpl
More file actions
27 lines (20 loc) · 824 Bytes
/
Copy pathDockerfile--std.tmpl
File metadata and controls
27 lines (20 loc) · 824 Bytes
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
ARG PG_VERSION
ARG PYTHON_VERSION
# --------------------------------------------- base1
FROM postgres:${PG_VERSION}-alpine as base1
# --------------------------------------------- base2_with_python-2
FROM base1 as base2_with_python-2
RUN apk add --no-cache curl python2 python2-dev build-base musl-dev linux-headers py-virtualenv py-pip
ENV PYTHON_VERSION=2
# --------------------------------------------- base2_with_python-3
FROM base1 as base2_with_python-3
RUN apk add --no-cache curl python3 python3-dev build-base musl-dev linux-headers py-virtualenv
ENV PYTHON_VERSION=3
# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} as final
ENV LANG=C.UTF-8
ADD . /pg/testgres
WORKDIR /pg/testgres
RUN chown -R postgres:postgres /pg
USER postgres
ENTRYPOINT bash run_tests.sh