Add: basic Dockerfile
This commit is contained in:
parent
ce63a2fee9
commit
dec0257fea
1 changed files with 21 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Use an official Python runtime as a parent image
|
||||||
|
FROM python:3.10-slim-bullseye
|
||||||
|
|
||||||
|
# Set the working directory to /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the current directory contents into the container at /app
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# Install any needed packages specified in requirements.txt
|
||||||
|
RUN export PYTHONPATH=/usr/bin/python && pip install --no-cache-dir -r requirements.txt
|
||||||
|
# RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Make port 8000 available to the world outside this container
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Define environment variable
|
||||||
|
#ENV DJANGO_SETTINGS_MODULE=mysite.settings.production
|
||||||
|
|
||||||
|
# Run the command to start Django
|
||||||
|
CMD ["python", "archivist/manage.py", "runserver", "0.0.0.0:8000"]
|
Loading…
Reference in a new issue