mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-16 22:09:25 +08:00
Update Dockerfile
This commit is contained in:
parent
fffe3c7145
commit
30fd8e6027
1 changed files with 46 additions and 46 deletions
92
Dockerfile
92
Dockerfile
|
@ -1,46 +1,46 @@
|
|||
# Use the official Python 3.11 image
|
||||
FROM --platform=arm64 python:3.11.7-bullseye
|
||||
# ARG BUILDPLATFORM
|
||||
# FROM python:3.11.7-bullseye
|
||||
|
||||
ENV PYTHONBUFFERED 1
|
||||
|
||||
RUN apt-get update
|
||||
# Install necessary dependencies, including cmake
|
||||
RUN apt-get install -y \
|
||||
wget \
|
||||
tar \
|
||||
cmake \
|
||||
proj-bin \
|
||||
libgeos-c1v5 \
|
||||
libproj-dev \
|
||||
libfreexl1 \
|
||||
libminizip-dev \
|
||||
libspatialite-dev \
|
||||
gdal-bin \
|
||||
libsqlite3-mod-spatialite \
|
||||
vim
|
||||
|
||||
# Create directory
|
||||
RUN mkdir /code
|
||||
|
||||
# Set the working directory to /code
|
||||
WORKDIR /code
|
||||
|
||||
# Mirror the current directory to the working directory for hotreloading
|
||||
ADD . /code/
|
||||
|
||||
# Install pipenv
|
||||
RUN pip install --no-cache-dir -r linux-requirements.txt
|
||||
|
||||
# Make migrations
|
||||
RUN python stude/manage.py makemigrations
|
||||
|
||||
# Run custom migrate
|
||||
RUN python stude/manage.py custom_migrate
|
||||
|
||||
# Generate DRF Spectacular Documentation
|
||||
RUN python stude/manage.py spectacular --color --file stude/schema.yml
|
||||
|
||||
# Expose port 8000 for the web server
|
||||
EXPOSE 8000
|
||||
# Use the official Python 3.11 image
|
||||
FROM --platform=arm64 python:3.11.9-bookworm
|
||||
# ARG BUILDPLATFORM
|
||||
# FROM python:3.11.7-bullseye
|
||||
|
||||
ENV PYTHONBUFFERED 1
|
||||
|
||||
RUN apt-get update
|
||||
# Install necessary dependencies, including cmake
|
||||
RUN apt-get install -y \
|
||||
wget \
|
||||
tar \
|
||||
cmake \
|
||||
proj-bin \
|
||||
libgeos-c1v5 \
|
||||
libproj-dev \
|
||||
libfreexl1 \
|
||||
libminizip-dev \
|
||||
libspatialite-dev \
|
||||
gdal-bin \
|
||||
libsqlite3-mod-spatialite \
|
||||
vim
|
||||
|
||||
# Create directory
|
||||
RUN mkdir /code
|
||||
|
||||
# Set the working directory to /code
|
||||
WORKDIR /code
|
||||
|
||||
# Mirror the current directory to the working directory for hotreloading
|
||||
ADD . /code/
|
||||
|
||||
# Install pipenv
|
||||
RUN pip install --no-cache-dir -r linux-requirements.txt
|
||||
|
||||
# Make migrations
|
||||
RUN python stude/manage.py makemigrations
|
||||
|
||||
# Run custom migrate
|
||||
RUN python stude/manage.py custom_migrate
|
||||
|
||||
# Generate DRF Spectacular Documentation
|
||||
RUN python stude/manage.py spectacular --color --file stude/schema.yml
|
||||
|
||||
# Expose port 8000 for the web server
|
||||
EXPOSE 8000
|
||||
|
|
Loading…
Reference in a new issue