FROM openjdk:8
ARG JMETER_VERSION=5.6.3
RUN mkdir /jmeter
WORKDIR /jmeter
# 复制你的压测文件到jmeter到工作目录
COPY your.jmx /jmeter
COPY apache-jmeter-${JMETER_VERSION}.tgz /jmeter
RUN tar -xzf apache-jmeter-$JMETER_VERSION.tgz
ENV JMETER_HOME=/jmeter/apache-jmeter-${JMETER_VERSION}
ENV JMETER_PATH=${JMETER_HOME}/bin:${PATH}
ENV PATH=${JMETER_HOME}/bin:${PATH}
WORKDIR /jmeter/apache-jmeter-$JMETER_VERSION/bin
EXPOSE 6000
CMD jmeter -n -t /jmeter/your.jmx
docker build -t your_image_name:you_image_version .