-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (21 loc) · 1.03 KB
/
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
FROM postgres:13
MAINTAINER LinShare <[email protected]>
EXPOSE 5432
ARG VERSION="6.3.0"
ARG CHANNEL="releases"
arg EXT="com"
RUN apt-get update && apt-get install bzip2 wget unzip -y && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN URL="https://nexus.linagora.${EXT}/service/local/artifact/maven/content?r=linshare-${CHANNEL}&g=org.linagora.linshare&a=linshare-core&c=sql&v=${VERSION}"; \
wget --no-check-certificate --progress=bar:force:noscroll \
-O linshare.tar.bz2 "${URL}&p=tar.bz2" \
&& wget --no-check-certificate --progress=bar:force:noscroll \
-O linshare.tar.bz2.sha1 "${URL}&p=tar.bz2.sha1" \
&& sed -i 's#^\(.*\)#\1\tlinshare.tar.bz2#' linshare.tar.bz2.sha1 \
&& sha1sum -c linshare.tar.bz2.sha1 --quiet && rm -f linshare.tar.bz2.sha1
RUN tar -xvjf linshare.tar.bz2 \
linshare-core-sql/postgresql/createSchema.sql \
linshare-core-sql/postgresql/import-postgresql.sql \
&& ln -s linshare-core-sql/postgresql/* . \
&& rm -f linshare.tar.bz2
COPY init-pg.sh /docker-entrypoint-initdb.d/01_init-pg.sh