microservices-demo/src/loadgenerator/Dockerfile
Colin Nelson 1263da2172 Reduced loadgenerator's image size (#52)
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`
2018-09-26 09:18:23 -07:00

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