Reduce loadgenerator's image size from ~972MB to ~117MB * Changed loadgen.sh to execute with `/bin/sh` as opposed to `/bin/bash` * Changed dockerfile to a multi stage build * Changed base image to `python:3-alpine` as opposed to `python:3.6`
21 lines
351 B
Docker
21 lines
351 B
Docker
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 --install-option="--prefix=/install" -r requirements.txt
|
|
|
|
FROM base
|
|
COPY --from=builder /install /usr/local
|
|
|
|
COPY . .
|
|
ENTRYPOINT ./loadgen.sh
|