forked from Sitecore/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (38 loc) · 1.37 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG BASE_IMAGE
FROM $BASE_IMAGE as builder
RUN apt-get -y update \
&& apt-get -y --allow-unauthenticated install unzip \
&& wget -progress=bar:force -q -O sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=2087431 \
&& unzip -qq sqlpackage.zip -d /opt/sqlpackage \
&& chmod +x /opt/sqlpackage/sqlpackage
COPY *.zip /opt/wdp/
RUN unzip -qq /opt/wdp/Sitecore*.zip -d /opt/wdp/ \
&& unzip -qq /opt/wdp/Sitecore*_single.scwdp.zip -d /opt/wdp/
ENV ACCEPT_EULA='Y' \
SA_PASSWORD='HASH-epsom-sunset-cost7!' \
MSSQL_PID=Developer \
DB_PREFIX='sc'
COPY *.bacpac /opt/shards/
COPY *.sh /opt/
RUN chmod +x /opt/install-databases.sh \
&& chmod +x /opt/install-shards.sh \
&& ( /opt/mssql/bin/sqlservr & ) | grep -q "Service Broker manager has started" \
&& ./opt/install-databases.sh /opt/wdp \
&& ./opt/install-shards.sh /opt/shards \
&& pkill sqlservr
FROM $BASE_IMAGE
COPY --from=builder ["/var/opt/mssql/data/sc_*", "/clean/"]
COPY *.sh /opt/
RUN chmod +x /opt/boot.sh && \
chmod +x /opt/attach-databases.sh && \
chmod -R 700 /clean && \
mkdir -p /data && \
chmod -R 700 /data
ENV ACCEPT_EULA='Y' \
SA_PASSWORD='HASH-epsom-sunset-cost7!' \
MSSQL_PID=Developer \
MSSQL_DATA_DIR='/data' \
MSSQL_LOG_DIR='/data' \
DB_PREFIX='sc' \
SQL_HOSTNAME='sql'
ENTRYPOINT ["/opt/boot.sh", "/clean", "/data"]