Skip to content

Commit 1bd223f

Browse files
authored
Fix permission denied errors during provisioning (#15)
* Pre-create /opt/mssql/etc folder * Bundled copy of entrypoint into other COPY statement to keep layer count low.
1 parent 3c5b3f6 commit 1bd223f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ RUN apt-get update && \
88
apt-get install -y gettext pwgen && \
99
rm -rf /var/lib/apt/lists/*
1010

11-
# Copy in scripts
12-
COPY docker-entrypoint.sh /usr/local/bin/
13-
COPY --chmod=0664 --chown=1000:1000 setup.sql restore.sql /opt/mssql/etc/
11+
# Copy in scripts. Use 1000:1000 ownership to align with upstream MSSQL image (reasons for this choice upstream unclear)
12+
RUN mkdir -p /opt/mssql/etc && \
13+
chown 1000:1000 /opt/mssql/etc
14+
COPY --chmod=0664 --chown=1000:1000 \
15+
setup.sql \
16+
restore.sql \
17+
/opt/mssql/etc/
1418
COPY --chmod=0755 --chown=root:root \
19+
docker-entrypoint.sh \
1520
healthcheck.sh \
1621
backup.sh \
1722
/usr/local/bin/

0 commit comments

Comments
 (0)