-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM python:3.10 | ||
|
||
RUN mkdir /opt/app | ||
WORKDIR /opt/app | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
unixodbc-dev \ | ||
unixodbc \ | ||
libpq-dev \ | ||
curl \ | ||
&& wget http://security.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.5_amd64.deb \ | ||
&& apt-get install ./multiarch-support_2.27-3ubuntu1.5_amd64.deb \ | ||
&& rm multiarch-support_2.27-3ubuntu1.5_amd64.deb \ | ||
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ | ||
&& curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \ | ||
&& apt-get update \ | ||
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc-dev \ | ||
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \ | ||
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ADD requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
RUN useradd -m client | ||
USER client | ||
|
||
CMD [ "python", "main.py" ] |