first pass attempt at making the container smaller
This commit is contained in:
parent
728cb720e7
commit
69482c518c
20
Dockerfile
20
Dockerfile
@ -3,26 +3,32 @@ FROM python:3.11-alpine AS base
|
|||||||
# install rust environment (for rant)
|
# install rust environment (for rant)
|
||||||
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUST_VERSION=1.61.0
|
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUST_VERSION=1.61.0
|
||||||
RUN apk add --no-cache rustup gcc musl-dev
|
RUN apk add --no-cache rustup gcc musl-dev
|
||||||
RUN rustup-init -y
|
RUN rustup-init -y --profile minimal
|
||||||
|
|
||||||
# install rant
|
# install rant
|
||||||
RUN cargo install --color=never rant --version 4.0.0-alpha.33 --root / --features cli
|
RUN cargo install --color=never rant --version 4.0.0-alpha.33 --root / --features cli
|
||||||
|
|
||||||
|
# python prereqs
|
||||||
|
COPY app/requirements.txt /app/requirements.txt
|
||||||
|
RUN pip install -r /app/requirements.txt
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
RUN cargo install cargo-cache --root /
|
||||||
|
RUN cargo cache --remove-dir all
|
||||||
|
RUN pip cache purge
|
||||||
|
RUN apk del rustup gcc musl-dev
|
||||||
|
|
||||||
|
FROM base AS app
|
||||||
RUN mkdir -p /lib/wordlist
|
RUN mkdir -p /lib/wordlist
|
||||||
COPY ext/imsky/wordlists /lib/wordlist
|
COPY ext/imsky/wordlists /lib/wordlist
|
||||||
#RUN python /lib/wordlist/render.py -o rant /app/rant/wordlist.rant
|
#RUN python /lib/wordlist/render.py -o rant /app/rant/wordlist.rant
|
||||||
|
|
||||||
# prereqs
|
|
||||||
COPY app/requirements.txt /app/requirements.txt
|
|
||||||
RUN pip install -r /app/requirements.txt
|
|
||||||
|
|
||||||
# installing app
|
# installing app
|
||||||
COPY app /app
|
COPY app /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
CMD [ "python", "index.wsgi" ]
|
CMD [ "python", "index.wsgi" ]
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
FROM base AS dev
|
FROM app AS dev
|
||||||
COPY static /app/static
|
COPY static /app/static
|
Loading…
x
Reference in New Issue
Block a user