Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile to have less layers #155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
FROM blazemeter/taurus:1.16.26
# taurus includes python and pip
RUN /usr/bin/python3 -m pip install --upgrade pip
RUN pip install --no-cache-dir awscli
RUN apt-get -y install xmlstarlet bc procps

# Removing selenium and gatling from our image as they are not supported in DLT
RUN rm -rf /root/.bzt/selenium-taurus
RUN rm -rf /root/.bzt/gatling-taurus
RUN rm -rf /root/.bzt/selenium-taurus /root/.bzt/gatling-taurus

# taurus includes python and pip
RUN /usr/bin/python3 -m pip install --upgrade pip \
&& pip install --no-cache-dir awscli \
&& apt-get -y install xmlstarlet bc procps \
&& apt-get update && apt-get upgrade -y

RUN apt-get update && apt-get upgrade -y
# Taurus working directory = /bzt-configs
ADD ./load-test.sh /bzt-configs/
ADD ./*.jar /bzt-configs/
ADD ./*.py /bzt-configs/

RUN chmod 755 /bzt-configs/load-test.sh
RUN chmod 755 /bzt-configs/ecslistener.py
RUN chmod 755 /bzt-configs/ecscontroller.py
RUN chmod 755 /bzt-configs/jar_updater.py
RUN chmod 755 \
/bzt-configs/load-test.sh \
/bzt-configs/ecslistener.py \
/bzt-configs/ecscontroller.py \
/bzt-configs/jar_updater.py
RUN python3 /bzt-configs/jar_updater.py

# Fixing CVE-2023-22796
WORKDIR /usr/local/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rbs-2.8.2/steep
RUN sed -i 's/7.0.4/7.0.7.1/g' Gemfile.lock
RUN gem install activesupport -v 7.0.7.1
RUN sed -i 's/7.0.4/7.0.7.1/g' Gemfile.lock \
&& gem install activesupport -v 7.0.7.1

# Replacing urllib3, Werkzeug and cryptography with more stable Versions to fix vulnerabilities
RUN pip install urllib3==2.0.7
RUN pip install Werkzeug==3.0.1
RUN pip install cryptography==41.0.5
RUN rm -rf /root/.bzt/python-packages/3.10.12/urllib3*
RUN rm -rf /root/.bzt/python-packages/3.10.12/werkzeug*
RUN rm -rf /root/.bzt/python-packages/3.10.12/cryptography*
RUN cp -r /usr/local/lib/python3.10/dist-packages/urllib3* /root/.bzt/python-packages/3.10.12/
RUN cp -r /usr/local/lib/python3.10/dist-packages/werkzeug* /root/.bzt/python-packages/3.10.12/
RUN cp -r /usr/local/lib/python3.10/dist-packages/cryptography* /root/.bzt/python-packages/3.10.12/
RUN pip install urllib3==2.0.7 Werkzeug==3.0.1 cryptography==41.0.5 \
&& rm -rf \
/root/.bzt/python-packages/3.10.12/urllib3* \
/root/.bzt/python-packages/3.10.12/werkzeug* \
/root/.bzt/python-packages/3.10.12/cryptography* \
&& cp -r /usr/local/lib/python3.10/dist-packages/urllib3* /root/.bzt/python-packages/3.10.12/ \
&& cp -r /usr/local/lib/python3.10/dist-packages/werkzeug* /root/.bzt/python-packages/3.10.12/
&& cp -r /usr/local/lib/python3.10/dist-packages/cryptography* /root/.bzt/python-packages/3.10.12/

WORKDIR /bzt-configs/
ENTRYPOINT ["./load-test.sh"]