-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
30 lines (21 loc) · 897 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
28
29
30
# This file is used to containerize our application
# It specifies which files to copy into the container, which
# packages to install, and which command to run for the application.
# Ruild using: docker build -t <image-name> .
# Run using: docker run -p 8080:8080 <image-name>
# Use an official Python runtime as a parent image
FROM python:3.8-slim
# Set the working directory to /app
WORKDIR /app
# Copy dependencies into the container at /app
COPY pyproject.toml /app
# Install depencies only, avoids re-installing all dependencies when the code changes
RUN pip install .
# Now copy the code into the container at /app
COPY /src /app/src
# Install our project only when the code changes, to speed up the build
RUN pip install .
# Make port available to the world outside this container
ENV PORT 8080
# Run app.py when the container launches
CMD ["python", "src/turbine_power/app.py"]