Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from 9to6/feature/add-locustfile-in-docker
Browse files Browse the repository at this point in the history
add locustfile.py to dockerfile
  • Loading branch information
9to6 authored Nov 24, 2022
2 parents 2657caf + a7a9a3f commit 6c9845a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG SRC_DIR=/go/src/github.com/klaytn/klaytn-load-tester

FROM golang:1.18-buster as builder
ARG SRC_DIR

RUN apt update && apt install -y make

ENV SRC_DIR /go/src/github.com/klaytn/klaytn-load-tester
ENV GOPATH /go

WORKDIR $SRC_DIR
Expand All @@ -11,9 +13,11 @@ ADD . .
RUN make && cp $SRC_DIR/build/bin/klayslave /bin/

FROM python:3.7-buster
ARG SRC_DIR

RUN pip3 install locust==1.2.3
RUN mkdir -p /locust-docker-pkg/bin

COPY --from=builder /bin/klayslave /locust-docker-pkg/bin/klayslave
COPY --from=builder $SRC_DIR/dist/locustfile.py /locust-docker-pkg/locustfile.py
RUN ln -s /locust-docker-pkg/bin/klayslave /bin/klayslave

0 comments on commit 6c9845a

Please sign in to comment.