-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.06 KB
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 1.06 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
FROM qcastel/maven-release:0.0.44
COPY ./mvn-action.sh /usr/local/bin
COPY ./settings.xml /usr/share/maven/conf
# Installer PostgreSQL et postgresql-client
RUN apk add --no-cache postgresql postgresql-client postgresql-contrib
# Créer le répertoire de données PostgreSQL
RUN mkdir -p /var/lib/postgresql/data && \
chown -R postgres:postgres /var/lib/postgresql/data
# Initialiser la base de données PostgreSQL
USER postgres
RUN initdb -D /var/lib/postgresql/data
# Configurer PostgreSQL pour accepter les connexions locales (trust pour simplifier)
RUN echo "host all all 127.0.0.1/32 trust" >> /var/lib/postgresql/data/pg_hba.conf && \
echo "host all all ::1/128 trust" >> /var/lib/postgresql/data/pg_hba.conf && \
echo "local all all trust" >> /var/lib/postgresql/data/pg_hba.conf && \
echo "listen_addresses='*'" >> /var/lib/postgresql/data/postgresql.conf
# Revenir à root pour le reste
USER root
# Copier le code source
WORKDIR /github/workspace
COPY . /github/workspace
# Installer su-exec pour changer d'utilisateur
RUN apk add --no-cache su-exec