loadgenerator: Reduced docker image size to ~117MB (down from ~972MB). Changed to a multi stage build and switched to using python:3-alpine as base image
This commit is contained in:
parent
19152425a1
commit
eafdf5c063
1 changed files with 16 additions and 2 deletions
|
@ -1,7 +1,21 @@
|
|||
FROM python:3.6
|
||||
FROM python:3-alpine as base
|
||||
|
||||
FROM base as builder
|
||||
|
||||
RUN apk add --update --no-cache \
|
||||
gcc \
|
||||
linux-headers \
|
||||
make \
|
||||
musl-dev \
|
||||
python-dev \
|
||||
g++
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
RUN pip install --install-option="--prefix=/install" -r requirements.txt
|
||||
|
||||
FROM base
|
||||
COPY --from=builder /install /usr/local
|
||||
|
||||
COPY . .
|
||||
ENTRYPOINT ./loadgen.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue