diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6d17a9c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +__pycache__/ +*.pyc +*.pyo +*.pyd +*.log +.DS_Store +.env +.venv/ +venv/ +node_modules/ +.git/ +.gitignore +db.sqlite3 +media/ +staticfiles/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9a6fc34..d111d59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/ -RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* COPY . /app