Add: basic dev dockerfile
This commit is contained in:
parent
943070df77
commit
bd21d2ed10
2 changed files with 51 additions and 21 deletions
21
Dockerfile
21
Dockerfile
|
@ -1,21 +0,0 @@
|
|||
# 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"]
|
51
Dockerfile-Dev
Normal file
51
Dockerfile-Dev
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Use an official Python runtime as a parent image
|
||||
#FROM python:3.10-slim-bullseye
|
||||
FROM python:3.11-alpine
|
||||
|
||||
LABEL name="Gallery-Archivist" \
|
||||
maintainer="Aroy-Art" \
|
||||
description="All-in-one personal social-media/art site archiving container" \
|
||||
homepage="https://git.aroy-art.com/Aroy/Gallery-Archivist" \
|
||||
documentation=""
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# Install apk dependencies
|
||||
RUN apk update && \
|
||||
apk add curl rustup cargo make gcc g++ automake subversion python3-dev
|
||||
|
||||
# Create non-privileged user
|
||||
ARG USER_ID
|
||||
RUN adduser -D -u $USER_ID archivist
|
||||
#RUN addgroup -S $GROUP \
|
||||
# && adduser --system --create-home --gid $GROUP --groups audio,video $USER
|
||||
|
||||
# Download latest yt-dlp version and make executable
|
||||
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && \
|
||||
chmod a+rx /usr/local/bin/yt-dlp
|
||||
|
||||
# Install latest stable gallery-dl
|
||||
RUN pip install -U gallery-dl
|
||||
|
||||
COPY ./requirements.txt /app/
|
||||
|
||||
# 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
|
||||
|
||||
USER archivist
|
||||
|
||||
# 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