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:
Colin Nelson 2018-09-26 08:36:38 -07:00
parent 19152425a1
commit eafdf5c063

View file

@ -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