-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 714 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 714 Bytes
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
FROM mcr.microsoft.com/mssql/server:2019-latest
EXPOSE 1433
LABEL "MAINTAINER" "Enrique Catalá Bañuls <enrique@enriquecatala.com>"
LABEL "Project" "Microsoft SQL Server image with sample databases"
RUN mkdir -p /var/opt/mssql/setup
# Copy the backup files to the container
WORKDIR /var/opt/mssql/setup
COPY setup.* ./
COPY entrypoint.sh ./
# Since SQL Server 2019 is non-root container, we need to force this to install packages
USER root
RUN chown -R 10001:0 setup.sh entrypoint.sh
# Get to the default user
USER 10001
RUN chmod +x setup.sh entrypoint.sh
# This entrypoint start sql server, restores data and waits infinitely
ENTRYPOINT ["./entrypoint.sh"]
CMD ["sleep infinity"]