-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (22 loc) · 858 Bytes
/
Dockerfile
File metadata and controls
33 lines (22 loc) · 858 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
31
32
33
FROM mcr.microsoft.com/mssql/server:2019-latest
ENV ACCEPT_EULA=Y
USER root
# Install unzip
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
# Copy startup script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Create backup directory
RUN mkdir -p /var/opt/mssql/backup
ENV VPIC_URL=https://vpic.nhtsa.dot.gov/downloads/vPICList_lite_2026_04.bak.zip
# Download, extract, and rename the vpic backup file
RUN set -e && \
curl -L -f -o /tmp/vpic.zip "$VPIC_URL" && \
unzip /tmp/vpic.zip -d /tmp && \
rm /tmp/vpic.zip && \
BAK_FILE=$(find /tmp -maxdepth 1 -name '*.bak' -type f | head -n 1) && \
if [ -z "$BAK_FILE" ]; then echo "No .bak file found in archive"; exit 1; fi && \
mv "$BAK_FILE" /var/opt/mssql/backup/vpic.bak
USER mssql
EXPOSE 1433
ENTRYPOINT ["/entrypoint.sh"]