Skip to content

Commit

Permalink
US46780 Upgrade Ubuntu Image (#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelmarik authored Feb 1, 2023
1 parent ced18dd commit 77cf26c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ node_modules

bzt/resources/NUnitRunner/*
.gradle

integr-artifacts*
*.log
examples/local*
bzt/20*
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM ubuntu:21.10

#replace 21.10 sources
RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/' /etc/apt/sources.list
RUN sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/' /etc/apt/sources.list
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1
Expand All @@ -13,13 +9,14 @@ ENV PIP_INSTALL="python3 -m pip install"
ADD https://deb.nodesource.com/setup_14.x /tmp
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /tmp
ADD https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb /tmp
ADD http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb /tmp
COPY dist/bzt*whl /tmp

WORKDIR /tmp
# add node repo and call 'apt-get update'
RUN bash ./setup_14.x && $APT_INSTALL build-essential python3-pip python3.9-dev net-tools apt-utils
RUN bash ./setup_14.x && $APT_INSTALL build-essential python3-pip python3.10-dev net-tools apt-utils

RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1

# install python packages..
RUN $PIP_INSTALL ./bzt*whl chardet
Expand All @@ -29,22 +26,25 @@ RUN $PIP_INSTALL --user --upgrade pip pillow oauthlib pyjwt httplib2 numpy

RUN $APT_UPDATE && $APT_INSTALL \
unzip software-properties-common apt-transport-https \
openjdk-11-jdk xvfb siege apache2-utils firefox ruby ruby-dev make nodejs locales tsung
openjdk-11-jdk xvfb siege apache2-utils ruby ruby-dev make nodejs locales tsung

# firefox repo - do not use snap
RUN printf '%s\n' 'Package: firefox*' 'Pin: release o=Ubuntu*' 'Pin-Priority: -1' > /etc/apt/preferences.d/firefox-no-snap
RUN add-apt-repository ppa:mozillateam/ppa
RUN $APT_UPDATE && $APT_INSTALL firefox

# set en_US.UTF-8 as default locale
RUN locale-gen "en_US.UTF-8" && update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8

# Force cgi version to fix CVE-2021-41816
RUN gem install rspec rake selenium-webdriver cgi:0.1.1 && gem update bundler date && gem cleanup \
&& rm /usr/lib/ruby/gems/2.7.0/specifications/default/cgi-0.1.0.gemspec \
&& rm /usr/lib/ruby/gems/2.7.0/specifications/default/bundler-2.1.4.gemspec \
&& rm /usr/lib/ruby/gems/2.7.0/specifications/default/date-3.0.0.gemspec
# Force cgi version to fix CVE-2021-41816 -> updated to 0.2.0
RUN gem install rspec rake selenium-webdriver cgi:0.1.1 && gem update bundler date && gem cleanup

# Get Google Chrome
RUN $APT_INSTALL ./google-chrome-stable_current_amd64.deb \
&& mv /opt/google/chrome/google-chrome /opt/google/chrome/_google-chrome

# Get .NET Core
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
RUN $APT_INSTALL ./packages-microsoft-prod.deb \
# Update is required because packages-microsoft-prod.deb installation add repositories for dotnet
&& $APT_UPDATE \
Expand Down

0 comments on commit 77cf26c

Please # to comment.