-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 1.29 KB
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 1.29 KB
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
# ---------------------------------------------------------------------------------------------------------------------
# ** stage 1: production image
# ---------------------------------------------------------------------------------------------------------------------
# ** info: declaration of the image base version
FROM postgres:16.0
# ** info: declaration of the image env variables
ENV POSTGRES_DB=users_db
ENV POSTGRES_PASSWORD=postgres
ENV POSTGRES_USER=postgres
# ** info: declaration of the image working directory
ARG WORKDIR=/home/build
# ** info: creating the image working directory
RUN mkdir -p $WORKDIR
# ** info: copying the sql script files from the building context to the working directory
COPY ["schema_1", "$WORKDIR/schema_1/"]
COPY ["schema_2", "$WORKDIR/schema_2/"]
COPY ["tv_programation_schema", "$WORKDIR/tv_programation_schema/"]
# ** info: copying the postgres config file from the building context to the initdb folder
COPY ["postgresql.conf", "/"]
# ** info: copying the shell install script from the building context to the initdb folder
COPY ["mount_db.sh", "/docker-entrypoint-initdb.d/"]
# ** info: converting the shell script to unix formatt
RUN apt-get update
RUN apt-get install -y dos2unix
RUN dos2unix /docker-entrypoint-initdb.d/mount_db.sh