Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 155558b

Browse files
committed
Fix added 200mb due to chown / chmod docker layers
1 parent d43fef5 commit 155558b

File tree

6 files changed

+54
-28
lines changed

6 files changed

+54
-28
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ Note image ids also change after scm-source.json has being updated which trigger
77
###### To get container versions
88
docker exec grid versions
99

10+
## TBD_DOCKER_TAG
11+
+ **Changes:** https://github.com/elgalu/docker-selenium/compare/3.5.3-p10...3.5.3-p11 (TBD_DATE)
12+
+ Fix added 200mb due to chown / chmod docker layers
13+
+ **Image tag details:**
14+
+ Selenium version: TBD_SELENIUM_3_VERSION (TBD_SELENIUM_3_REVISION)
15+
+ Chrome stable: TBD_CHROME_STABLE
16+
+ Firefox stable: TBD_FIREFOX_FOR_SEL3
17+
+ Geckodriver: TBD_GECKO_DRIVER
18+
+ Chromedriver: TBD_CHROME_DRIVER (TBD_CHROMEDRIVER_COMMIT)
19+
+ Java: TBD_JAVA_VENDOR Java TBD_JAVA_BUILD
20+
+ Timezone: TBD_TIME_ZONE
21+
+ FROM ubuntu:UBUNTU_FLAVOR-UBUNTU_DATE
22+
+ Python: TBD_PYTHON_VERSION
23+
+ Tested on kernel dev host: 4.4.0-96-generic x86_64
24+
+ Tested on kernel CI host: TBD_HOST_UNAME
25+
+ Built at dev host with: Docker version 17.07.0-ce, build 8784753
26+
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
27+
+ Built at dev host with: Docker Compose version 1.16.1, build 6d1ac21
28+
+ Built at CI host with: Docker Compose version TBD_DOCKER_COMPOSE_VERS, build TBD_DOCKER_COMPOSE_BUILD
29+
+ Image size: TBD_IMAGE_SIZE
30+
+ Digest: TBD_DIGEST
31+
+ Image ID: TBD_IMAGE_ID
32+
1033
## 3.5.3-p10
1134
+ **Changes:** https://github.com/elgalu/docker-selenium/compare/3.5.3-p9...3.5.3-p10 (2017-09-29)
1235
+ Upgrade Firefox major from 55.0.3 to 56 @diemol

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For pull requests or local commits:
1111

1212
For repository owners only:
1313

14-
git commit -m "Tests: ROLLBACK: Upgrade python bindings from 3.5.0 to selenium==3.6.0"
14+
git commit -m "Fix added 200mb due to chown / chmod docker layers"
1515
git tag -d latest; git tag -d `cat VERSION`; git push origin :`cat VERSION`; git tag `cat VERSION` && git push --force origin tmp-`cat VERSION` && git push --tags
1616

1717
-- Wait for Travis to pass OK

Dockerfile

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,11 @@ USER seluser
550550
# Regarding the pip packages, see released versions at:
551551
# https://github.com/mozilla/mozdownload/releases
552552

553+
#=============================
554+
# sudo by default from now on
555+
#=============================
556+
USER root
557+
553558
ENV FF_LANG="en-US" \
554559
FF_BASE_URL="https://archive.mozilla.org/pub" \
555560
FF_PLATFORM="linux-x86_64" \
@@ -560,20 +565,17 @@ ENV FF_LANG="en-US" \
560565
ENV FF_VER="56.0"
561566
ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
562567
ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
563-
RUN wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
568+
RUN cd /opt \
569+
&& wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
564570
&& bzip2 -d "firefox.tar.bz2" \
565571
&& tar xf "firefox.tar" \
566572
&& rm "firefox.tar" \
567-
&& mv firefox firefox-for-sel-3 \
568-
&& sudo ln -fs /home/seluser/firefox-for-sel-3/firefox /usr/bin/firefox
573+
&& ln -fs /opt/firefox/firefox /usr/bin/firefox \
574+
&& chown -R seluser:seluser /opt/firefox \
575+
&& chmod -R 777 /opt/firefox
569576

570577
LABEL selenium_firefox_version "56.0"
571578

572-
#=============================
573-
# sudo by default from now on
574-
#=============================
575-
USER root
576-
577579
#============
578580
# GeckoDriver
579581
#============
@@ -624,7 +626,8 @@ COPY lib/* /usr/lib/
624626
# Use a custom wallpaper for Fluxbox
625627
COPY images/wallpaper-dosel.png /usr/share/images/fluxbox/ubuntu-light.png
626628
COPY images/wallpaper-zalenium.png /usr/share/images/fluxbox/
627-
RUN chown -R seluser:seluser /usr/share/images/fluxbox/
629+
RUN chown -R seluser:seluser /usr/share/images/fluxbox/ \
630+
&& chmod -R 777 /usr/share/images/fluxbox
628631

629632
#===================================================
630633
# Run the following commands as non-privileged user
@@ -960,6 +963,15 @@ COPY images ./images
960963
COPY LICENSE.md /home/seluser/
961964
COPY Analytics.md /home/seluser/
962965

966+
# Include current version
967+
COPY VERSION /home/seluser/
968+
969+
# Moved from entry.sh
970+
ENV SUPERVISOR_PIDFILE="${RUN_DIR}/supervisord.pid" \
971+
DOCKER_SELENIUM_STATUS="${LOGS_DIR}/docker-selenium-status.log" \
972+
VNC_TRYOUT_ERR_LOG="${LOGS_DIR}/vnc-tryouts-stderr" \
973+
VNC_TRYOUT_OUT_LOG="${LOGS_DIR}/vnc-tryouts-stdout"
974+
963975
#===================================
964976
# Fix dirs (again) and final chores
965977
#===================================
@@ -977,22 +989,9 @@ RUN mkdir -p /home/seluser/.vnc \
977989
&& sudo mkdir -p ${LOGS_DIR} \
978990
&& sudo mkdir -p ${RUN_DIR} \
979991
&& sudo mkdir -p /tmp/.X11-unix /tmp/.ICE-unix \
992+
&& sudo fixperms.sh \
980993
&& echo ""
981994

982-
# Moved from entry.sh
983-
ENV SUPERVISOR_PIDFILE="${RUN_DIR}/supervisord.pid" \
984-
DOCKER_SELENIUM_STATUS="${LOGS_DIR}/docker-selenium-status.log" \
985-
VNC_TRYOUT_ERR_LOG="${LOGS_DIR}/vnc-tryouts-stderr" \
986-
VNC_TRYOUT_OUT_LOG="${LOGS_DIR}/vnc-tryouts-stdout"
987-
988-
# Include current version
989-
COPY VERSION /home/seluser/
990-
991-
######################################################################
992-
# Relaxing permissions for OpenShift and other non-sudo environments #
993-
######################################################################
994-
RUN sudo fixperms.sh
995-
996995
#=====================================================
997996
# Meta JSON file to hold commit info of current build
998997
#=====================================================

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.5.3-p10
1+
3.5.3-p11

bin/entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fi
111111
# Fix/extend ENV vars
112112
#---------------------
113113
export SELENIUM_JAR_PATH="/home/seluser/selenium-server-standalone-3.jar"
114-
export FIREFOX_DEST_BIN="/home/seluser/firefox-for-sel-3/firefox"
114+
export FIREFOX_DEST_BIN="/usr/bin/firefox"
115115
export DOSEL_VERSION=$(cat VERSION)
116116
export FIREFOX_VERSION=$(firefox_version)
117117
# CHROME_FLAVOR would allow to have separate installations for stable, beta, unstable

bin/fixperms.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
# set +e: don't exit if a command exits with a non-zero status
44
set +e
55

6+
######################################################################
7+
# Relaxing permissions for OpenShift and other non-sudo environments #
8+
######################################################################
9+
610
# List of directories in which we need to fix perms:
7-
DIR_LIST="/usr/share/images/fluxbox /var/lib/dbus /tmp /var/run /run /var/log /etc/supervisor"
8-
DIR_LIST="${DIR_LIST} /videos /test /home/seluser"
11+
DIR_LIST="/var/lib/dbus /tmp /var/run /run /var/log/cont /etc/supervisor"
12+
DIR_LIST="${DIR_LIST} /videos ${VIDEOS_DIR} /test /home/seluser"
913

1014
# Relaxing permissions for OpenShift and other non-sudo environments
1115
chmod 777 /etc/passwd

0 commit comments

Comments
 (0)