-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 843 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
26
27
28
29
30
FROM mcr.microsoft.com/mssql/server:2019-latest
# BASED in repositoris:
# - https://github.com/microsoft/mssql-docker/tree/master/linux/preview/examples/mssql-customize
# Other info: https://github.com/microsoft/mssql-docker/issues/2
# Switch to root user for access to apt-get install
USER root
# Install dos2unix
RUN apt-get -y update && \
apt-get install -y dos2unix && \
rm -rf /var/lib/apt/lists/*
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY docker /usr/src/app
# Convert line endigs in shell scripts to Unix and make them executable
RUN dos2unix /usr/src/app/scripts/*.sh && \
chmod +x /usr/src/app/scripts/*.sh
# Switch back to mssql user and run the entrypoint script
USER mssql
ENTRYPOINT ["/usr/src/app/scripts/entrypoint.sh"]
# Keep the container running
CMD ["tail -f /dev/null"]