forked from yochananrachamim/AzureSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (21 loc) · 917 Bytes
/
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
# Use an official Python runtime as a parent image
FROM python:3.8-slim
# Set the working directory to /app
WORKDIR /app
# Install the SQL Server tools (sqlcmd) and ODBC drivers
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get install -y gnupg \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y mssql-tools \
&& apt-get install vim -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Copy the current directory contents into the container at /app
COPY . /app
# Install any Python dependencies specified in requirements.txt
#RUN pip install -r requirements.txt
# Define the default command to run your Python script with sqlcmd
CMD ["python", "maintenance.py"]