This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install curl apt-transport-https ca-certificates software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
USER_DOCKER=$(getent passwd {1000..60000} | grep "/bin/bash" | awk -F: '{ print $1}') | |
sudo usermod -aG docker $USER_DOCKER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install curl apt-transport-https ca-certificates software-properties-common \ | |
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add \ | |
&& sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ | |
&& sudo apt-get update \ | |
&& sudo apt-get install -y docker-ce \ | |
&& sudo usermod -aG docker $USER \ | |
&& sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \ | |
&& sudo chmod +x /usr/local/bin/docker-compose \ | |
&& sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run command to allocate the default system resources to JMeter at 'docker run' | |
sed -i 's/\("${HEAP:="\)\(.*\)\("}"\)/\1-Xms'${Xms}' -Xmx'${Xmx}' -XX:MaxMetaspaceSize='${MaxMetaspaceSize}'\3/' ${JMETER_BIN}/jmeter && | |
$JMETER_HOME/bin/jmeter-server \ | |
-Dserver.rmi.localport=50000 \ | |
-Dserver_port=1099 \ | |
-Dserver.rmi.ssl.disable=true \ | |
-Djava.rmi.server.hostname=$HostIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use my custom base image defined above | |
FROM dragoscampean/testrepo:jmetrubase | |
MAINTAINER Dragos | |
# Expose ports for JMeter Slave | |
EXPOSE 1099 50000 | |
COPY entrypoint.sh / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use my custom base image defined above | |
FROM dragoscampean/testrepo:jmetrubase | |
MAINTAINER Dragos | |
# Expose port for JMeter Master | |
EXPOSE 60000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run command to allocate the default or custom system resources (memory) to JMeter at 'docker run' | |
sed -i 's/\("${HEAP:="\)\(.*\)\("}"\)/\1-Xms'${Xms}' -Xmx'${Xmx}' -XX:MaxMetaspaceSize='${MaxMetaspaceSize}'\3/' ${JMETER_BIN}/jmeter | |
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Java 11 JDK Oracle Linux | |
FROM openjdk:11-jdk-oracle | |
MAINTAINER Dragos | |
# Set the JMeter version you want to use | |
ARG JMETER_VERSION="5.1.1" | |
# Set JMeter related environment variables | |
ENV JMETER_HOME /opt/apache-jmeter-${JMETER_VERSION} | |
ENV JMETER_BIN ${JMETER_HOME}/bin | |
ENV JMETER_DOWNLOAD_URL https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${JMETER_VERSION}.tgz | |
# Set default values for allocation of system resources (memory) which will be used by JMeter |