Skip to content

Instantly share code, notes, and snippets.

@joshatxantie
Created September 2, 2021 04:18
Show Gist options
  • Select an option

  • Save joshatxantie/4bcf5d0243fba63845fce7cc40365a3a to your computer and use it in GitHub Desktop.

Select an option

Save joshatxantie/4bcf5d0243fba63845fce7cc40365a3a to your computer and use it in GitHub Desktop.

Revisions

  1. joshatxantie created this gist Sep 2, 2021.
    23 changes: 23 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # syntax=docker/dockerfile:1

    FROM python:3.8-slim-buster

    WORKDIR /app

    ENV ACCEPT_EULA=Y
    RUN apt-get update -y && apt-get update \
    && apt-get install -y --no-install-recommends curl gcc g++ gnupg unixodbc-dev

    RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
    && curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list \
    && apt-get update \
    && apt-get install -y --no-install-recommends --allow-unauthenticated msodbcsql17 mssql-tools \
    && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \
    && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc

    COPY requirements.txt requirements.txt
    RUN pip3 install -r requirements.txt

    COPY . .

    CMD [ "python3", "main.py" ]