Skip to content

Instantly share code, notes, and snippets.

@ahmedsadman
Created June 12, 2020 22:30
Show Gist options
  • Save ahmedsadman/eb640440a265b9ec2e5ab3fe65c6488c to your computer and use it in GitHub Desktop.
Save ahmedsadman/eb640440a265b9ec2e5ab3fe65c6488c to your computer and use it in GitHub Desktop.
# pull official base image
FROM python:3.8.2
# set work directory
WORKDIR /app
RUN pip install --upgrade pip
# required for some package builds
RUN apt-get install libssl-dev libffi-dev
# install dependencies
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy project
COPY . .
EXPOSE 5000
RUN chmod +x ./docker-entrypoint.sh
RUN chmod +x ./wait-for-it.sh
# wait for the database to be ready
ENTRYPOINT ["./wait-for-it.sh", "mysqldb:3306", "--", "./docker-entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment