-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
50 lines (42 loc) · 1.96 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM maven:3-eclipse-temurin-11
# install ant, python, utilities
RUN mkdir -p /usr/share/man/man1
RUN apt-get update && apt-get install -y ant wget unzip gnupg2 libgtk2.0-0 python3.11 python3-pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 \
&& update-alternatives --config python3
# install gradle
ENV GRADLE_HOME /opt/gradle
ENV GRADLE_VERSION 7.4
RUN wget --no-verbose --output-document=gradle.zip https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip \
&& unzip gradle.zip \
&& rm gradle.zip \
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \
&& ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle \
&& gradle --version
# get chrome version
ARG CHROME_RELEASE=117
RUN curl https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$CHROME_RELEASE > /root/chrome_version
# install chrome
RUN CHROME_VERSION=$(cat /root/chrome_version) \
&& wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
&& apt-get --fix-broken install -y ./google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
&& sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
# install chromedriver
RUN CHROME_VERSION=$(cat /root/chrome_version) \
&& wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chromedriver-linux64.zip \
&& unzip chromedriver-linux64.zip && mv chromedriver-linux64/chromedriver /usr/bin/chromedriver \
&& chmod +x /usr/bin/chromedriver
# install java lib dependencies
WORKDIR /app/tackle-test-cli
COPY tkltest-lib/*.* ./tkltest-lib/
WORKDIR /app/tackle-test-cli/tkltest-lib
RUN ./download_lib_jars.sh
# copy cli code and install tkltest command
WORKDIR /app/tackle-test-cli
COPY tkltest ./tkltest
COPY setup.py ./
COPY MANIFEST.in ./
RUN pip install .
# set entrypoint
COPY entrypoint.sh /app/
ENTRYPOINT ["/app/entrypoint.sh"]