選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Dockerfile 475B

12345678910111213141516
  1. # init a base image (Alpine is small Linux distro)
  2. FROM python:3.10-alpine
  3. # update pip to minimize dependency errors
  4. RUN pip install --upgrade pip
  5. # define the present working directory
  6. WORKDIR /docker-flask-test
  7. # copy the contents into the working dir
  8. ADD . /docker-flask-test
  9. # run pip to install the dependencies of the flask app
  10. RUN pip install -r requirements.txt
  11. WORKDIR flask_server
  12. EXPOSE 5000
  13. # define the command to start the container
  14. CMD ["python","app.py"]