Created
April 25, 2023 18:49
-
-
Save slopp/aee14cda0068d6c7c798b418067b400e to your computer and use it in GitHub Desktop.
Example Dagster Cloud Dockerfile
This file contains hidden or 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
FROM python:3.10-slim | |
# Get the files that define dependencies | |
COPY *setup.py *requirements.txt / | |
# If setup.py exists, we install the dependencies before | |
# copying all other files | |
RUN if [ -f "setup.py" ]; then \ | |
pip install .; \ | |
fi | |
# If requirements.txt exists, we install the dependencies before | |
# copying all other files | |
RUN if [ -f "requirements.txt" ]; then \ | |
pip install -r requirements.txt \ | |
fi | |
# Copying over the dagster project code after installing the dependencies means changes to just the code | |
# will hit the cache | |
WORKDIR /opt/dagster/app | |
COPY . /opt/dagster/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment