-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
30 lines (25 loc) · 1.12 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
FROM mcr.microsoft.com/mssql/server:2019-CU22-ubuntu-20.04
# Starting with SQL*Server 2017-CU6, by default, flushing became
# more aggresive, in order to guarantee consistency under power
# failures and similar situations. Explanations available:
# https://bobsql.com/sql-server-on-linux-forced-unit-access-fua-internals/
# But it came with some severe performance problems on write operations
# that haven't been fixed yet (making it some env variable for the images
# or whatever). See https://github.com/microsoft/mssql-docker/issues/355 .
#
# The very same applies to SQL*Server 2019.
#
# So here, we are just disabling such an aggressive flushing to make it
# work like was before CU6. We don't need it for testing purposes and
# differences, tested under standard conditions are big enough:
# Complete phpunit runs:
# - 2019-CU18: 4h 38m
# - 2019-CU18 + this patch: 1h 33m
USER root
RUN /opt/mssql/bin/mssql-conf traceflag 3979 on && \
/opt/mssql/bin/mssql-conf set control.alternatewritethrough 0 && \
/opt/mssql/bin/mssql-conf set control.writethrough 0
ADD root/ /
EXPOSE 1433
USER mssql
CMD ["/docker-entrypoint.sh"]