This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 332
/
Dockerfile
1170 lines (1091 loc) · 44.6 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
###################################################
# Selenium standalone docker for Chrome & Firefox #
###################################################
#== Ubuntu xenial is 16.04, i.e. FROM ubuntu:16.04
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
FROM ubuntu:xenial-20160629
ENV UBUNTU_FLAVOR="xenial" \
UBUNTU_DATE="20160629"
#== Ubuntu wily is 15.10, i.e. FROM ubuntu:15.10
# FROM ubuntu:wily-20151208
# ENV UBUNTU_FLAVOR wily
#== Ubuntu vivid is 15.04, i.e. FROM ubuntu:15.04
# https://cloud-images.ubuntu.com/releases/15.04/
# FROM ubuntu:vivid-20150611
# ENV UBUNTU_FLAVOR vivid
#== Ubuntu trusty is 14.04, i.e. FROM ubuntu:14.04
#== Could also use ubuntu:latest but for the sake I replicating an precise env...
# https://cloud-images.ubuntu.com/releases/14.04/
# FROM ubuntu:trusty-20150630
# ENV UBUNTU_FLAVOR trusty
#== Ubuntu precise is 12.04, i.e. FROM ubuntu:12.04
#== Could also use ubuntu:latest but for the sake I replicating an precise env...
# https://cloud-images.ubuntu.com/releases/12.04/
# FROM ubuntu:precise-20150612
# ENV UBUNTU_FLAVOR precise
#== Ubuntu flavors - common
RUN echo "deb http://archive.ubuntu.com/ubuntu ${UBUNTU_FLAVOR} main universe\n" > /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu ${UBUNTU_FLAVOR}-updates main universe\n" >> /etc/apt/sources.list
MAINTAINER Leo Gallucci <elgalu3@gmail.com>
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true
#========================
# Miscellaneous packages
#========================
# netcat-openbsd - nc — arbitrary TCP and UDP connections and listens
# net-tools - arp, hostname, ifconfig, netstat, route, plipconfig, iptunnel
# iputils-ping - ping, ping6 - send ICMP ECHO_REQUEST to network hosts
# apt-utils - commandline utilities related to package management with APT
# wget - The non-interactive network downloader
# curl - transfer a URL
# bc - An arbitrary precision calculator language
# pwgen: generates random, meaningless but pronounceable passwords
# ts from moreutils will prepend a timestamp to every line of input you give it
# grc is a terminal colorizer that works nice with tail https://github.com/garabik/grc
# dbus-x11 is needed to avoid http://askubuntu.com/q/237893/134645
RUN apt-get update -qqy \
&& apt-get -qqy install \
apt-utils \
sudo \
net-tools \
telnet \
jq \
netcat-openbsd \
iputils-ping \
unzip \
wget \
curl \
pwgen \
bc \
grc \
moreutils \
tree \
dbus-x11 \
&& rm -rf /var/lib/apt/lists/*
#==============================
# Locale and encoding settings
#==============================
# TODO: Allow to change instance language OS and Browser level
# see if this helps: https://github.com/rogaha/docker-desktop/blob/68d7ca9df47b98f3ba58184c951e49098024dc24/Dockerfile#L57
ENV LANG_WHICH en
ENV LANG_WHERE US
ENV ENCODING UTF-8
ENV LANGUAGE ${LANG_WHICH}_${LANG_WHERE}.${ENCODING}
ENV LANG ${LANGUAGE}
RUN locale-gen ${LANGUAGE} \
&& dpkg-reconfigure --frontend noninteractive locales \
&& apt-get update -qqy \
&& apt-get -qqy install \
language-pack-en \
&& rm -rf /var/lib/apt/lists/*
#===================
# Timezone settings
#===================
# Full list at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# e.g. "US/Pacific" for Los Angeles, California, USA
# e.g. ENV TZ "US/Pacific"
ENV TZ "Europe/Berlin"
# Apply TimeZone
RUN echo "Setting time zone to '${TZ}'" \
&& echo ${TZ} > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata
#==============================
# Java7 - OpenJDK JRE headless
# Minimal runtime used for executing non GUI Java programs
#==============================
# Regarding urandom see
# http://stackoverflow.com/q/26021181/511069
# https://github.com/SeleniumHQ/docker-selenium/issues/14#issuecomment-67414070
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# openjdk-7-jre-headless \
# && sed -i 's/securerandom.source=file:\/dev\/urandom/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/java.security \
# && sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/java.security \
# && rm -rf /var/lib/apt/lists/*
#==============================
# Java8 - OpenJDK JRE headless
# Minimal runtime used for executing non GUI Java programs
#==============================
# Regarding urandom see
# http://stackoverflow.com/q/26021181/511069
# https://github.com/SeleniumHQ/docker-selenium/issues/14#issuecomment-67414070
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# openjdk-8-jre-headless \
# && sed -i 's/securerandom.source=file:\/dev\/urandom/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security \
# && sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security \
# && rm -rf /var/lib/apt/lists/*
#==============================
# Java9 - OpenJDK JRE headless
# Minimal runtime used for executing non GUI Java programs
#==============================
# Regarding urandom see
# http://stackoverflow.com/q/26021181/511069
# https://github.com/SeleniumHQ/docker-selenium/issues/14#issuecomment-67414070
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# openjdk-9-jre-headless \
# && sed -i 's/securerandom.source=file:\/dev\/urandom/securerandom.source=file:\/dev\/.\/urandom/g' \
# /etc/java-9-openjdk/security/java.security \
# && sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g' \
# /etc/java-9-openjdk/security/java.security \
# && rm -rf /var/lib/apt/lists/*
#==================
# Java8 - Oracle
#==================
# Regarding urandom see
# http://stackoverflow.com/q/26021181/511069
# https://github.com/SeleniumHQ/docker-selenium/issues/14#issuecomment-67414070
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# software-properties-common \
# && echo debconf shared/accepted-oracle-license-v1-1 \
# select true | debconf-set-selections \
# && echo debconf shared/accepted-oracle-license-v1-1 \
# seen true | debconf-set-selections \
# && add-apt-repository ppa:webupd8team/java \
# && apt-get update -qqy \
# && apt-get -qqy install \
# oracle-java8-installer \
# && sed -i 's/securerandom.source=file:\/dev\/urandom/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-8-oracle/jre/lib/security/java.security \
# && sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g' \
# /usr/lib/jvm/java-8-oracle/jre/lib/security/java.security \
# && rm -rf /var/lib/apt/lists/*
#==================
# Java9 - Oracle
#==================
# Regarding urandom see
# http://stackoverflow.com/q/26021181/511069
# https://github.com/SeleniumHQ/docker-selenium/issues/14#issuecomment-67414070
RUN apt-get update -qqy \
&& apt-get -qqy install \
software-properties-common \
&& echo debconf shared/accepted-oracle-license-v1-1 \
select true | debconf-set-selections \
&& echo debconf shared/accepted-oracle-license-v1-1 \
seen true | debconf-set-selections \
&& add-apt-repository ppa:webupd8team/java \
&& apt-get update -qqy \
&& apt-get -qqy install \
oracle-java9-installer \
&& sed -i 's/securerandom.source=file:\/dev\/urandom/securerandom.source=file:\/dev\/.\/urandom/g' \
/usr/lib/jvm/java-9-oracle/conf/security/java.security \
&& sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g' \
/usr/lib/jvm/java-9-oracle/conf/security/java.security \
&& rm -rf /var/lib/apt/lists/*
#=========================
# Fonts & video libraries
#=========================
# and gstreamer for mp4 & html5 support
RUN apt-get update -qqy \
&& apt-get -qqy install \
fonts-ipafont-gothic \
xfonts-100dpi \
xfonts-75dpi \
xfonts-cyrillic \
xfonts-scalable \
ttf-ubuntu-font-family \
libfreetype6 \
libfontconfig \
gstreamer1.0-libav \
&& rm -rf /var/lib/apt/lists/*
#=========
# Openbox
# A lightweight window manager using freedesktop standards
#=========
RUN apt-get update -qqy \
&& apt-get -qqy install \
openbox obconf menu \
&& rm -rf /var/lib/apt/lists/*
#=========
# fluxbox
# A fast, lightweight and responsive window manager
#=========
RUN apt-get update -qqy \
&& apt-get -qqy install \
fluxbox \
&& rm -rf /var/lib/apt/lists/*
#========================================
# Add normal user with passwordless sudo
#========================================
ENV NORMAL_USER application
ENV NORMAL_GROUP ${NORMAL_USER}
ENV NORMAL_USER_UID 998
ENV NORMAL_USER_GID 997
RUN groupadd -g ${NORMAL_USER_GID} ${NORMAL_GROUP} \
&& useradd ${NORMAL_USER} --uid ${NORMAL_USER_UID} \
--shell /bin/bash --gid ${NORMAL_USER_GID} \
--create-home \
&& usermod -a -G sudo ${NORMAL_USER} \
&& gpasswd -a ${NORMAL_USER} video \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
ENV NORMAL_USER_HOME /home/${NORMAL_USER}
#==============
# Back to sudo
#==============
USER root
#=====================================
# Google Chrome - Latest through apt
#=====================================
#==========================
# If you have issue "Failed to move to new PID namespace" on OpenVZ (AWS ECS)
# https://bugs.launchpad.net/chromium-browser/+bug/577919
# - try to pass chrome switch --no-sandbox see: http://peter.sh/experiments/chromium-command-line-switches/#no-sandbox
# - try /dev/shm? see: https://github.com/travis-ci/travis-ci/issues/938#issuecomment-16345102
# - try xserver-xephyr see: https://github.com/enkidulan/hangout_api/blob/master/.travis.yml#L5
# && sudo chmod 1777 /dev/shm \
# - try /opt/google/chrome/chrome-sandbox see: https://github.com/web-animations/web-animations-js/blob/master/.travis-setup.sh#L66
# Package libnss3-1d might help with issue 20
# libnss3-1d \
# RUN wget -nv -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
# && echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
# && apt-get update -qqy \
# && apt-get -qqy install \
# google-chrome-${CHROME_FLAVOR} \
# && rm -rf /var/lib/apt/lists/* \
# && rm /etc/apt/sources.list.d/google-chrome.list
#===================
# VNC, Xvfb, Xdummy
#===================
# xvfb: Xvfb or X virtual framebuffer is a display server
# + implements the X11 display server protocol
# + performs all graphical operations in memory
#
# Xdummy: Is like Xvfb but uses an LD_PRELOAD hack to run a stock X server
# - uses a "dummy" video driver
# - with Xpra allows to use extensions like Randr, Composite, Damage
#
# Pyvnc2swf: Is a cross-platform screen recording tool (vnc2swf command)
# - captures screen motion through VNC protocol
# - generates a Shockwave Flash (SWF) movie
RUN apt-get update -qqy \
&& apt-get -qqy install \
x11vnc \
pyvnc2swf \
xvfb \
xorg \
xserver-xorg-video-dummy \
&& rm -rf /var/lib/apt/lists/*
ENV RUN_DIR /var/run/sele
#======================
# OpenSSH server (sshd)
#======================
# http://linux.die.net/man/5/sshd_config
# http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/sshd_config.5
RUN apt-get update -qqy \
&& apt-get -qqy install \
openssh-server \
&& echo "PidFile ${RUN_DIR}/sshd.pid" >> /etc/ssh/sshd_config \
&& rm -rf /var/lib/apt/lists/*
#=========
# Android
#=========
# TODO
# https://github.com/web-animations/web-animations-js/blob/master/.travis-setup.sh#L50
# https://github.com/elgalu/pastedirectory/blob/master/static/web_components/web-animations-js/tools/android/setup.sh
#============
# SelenDroid
#============
# TODO
# https://github.com/selendroid/selendroid
# http://selendroid.io/scale.html
########################################
# noVNC to expose VNC via an html page #
########################################
RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
# Download noVNC commit b403cb92f date 2016-02-24
&& export NOVNC_SHA="b403cb92fb8de82d04f305b4f14fa978003890d7" \
&& wget -nv -O noVNC.zip \
"https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}.zip" \
&& unzip -x noVNC.zip \
&& mv noVNC-${NOVNC_SHA} \
${NORMAL_USER_HOME}/noVNC \
# Download websockify commit 558a6439f dated 2015-06-02
&& export WEBSOCKIFY_SHA="558a6439f14b0d85a31145541745e25c255d576b" \
&& wget -nv -O websockify.zip \
"https://github.com/kanaka/websockify/archive/${WEBSOCKIFY_SHA}.zip" \
&& unzip -x websockify.zip \
&& mv websockify-${WEBSOCKIFY_SHA} \
${NORMAL_USER_HOME}/noVNC/utils/websockify
#===============================
# ffmpeg/libav and video codecs
#===============================
# ffmpeg (ffmpeg): Is a better alternative to Pyvnc2swf
# (use in Ubuntu >= 15) packages: ffmpeg
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# libx264-dev \
# libvorbis-dev \
# libx11-dev \
# ffmpeg \
# && rm -rf /var/lib/apt/lists/*
#===============================
# ffmpeg/libav and video codecs
#===============================
# libav-tools (avconv): Is a fork of ffmpeg
# (use in Ubuntu <= 14) packages: libav-tools libx264-142
RUN apt-get update -qqy \
&& apt-get -qqy install \
libx264-dev \
libvorbis-dev \
libx11-dev \
libav-tools \
&& rm -rf /var/lib/apt/lists/*
#=======================================================
# video-to-animated-gifs with vvo/gifify and imagemagick
#=======================================================
# gifify: check elgalu/gifify-docker instead
# imagemagick convert between image formats as well as transformations
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# imagemagick \
# fontconfig \
# libfontconfig1 \
# libfontconfig1-dev \
# libass5 \
# libass-dev \
# && rm -rf /var/lib/apt/lists/*
#=====================
# gifsicle for gifify
#=====================
# install fork of gifsicle with better lossless gif support
# ENV GIFS_VER=1.82.1
# RUN cd /usr/local/lib \
# && wget -nv "https://github.com/pornel/giflossy/releases/download/lossy%2F${GIFS_VER}/gifsicle-${GIFS_VER}-lossy.zip" \
# && unzip gifsicle-${GIFS_VER}-lossy.zip -d gifsicle \
# && rm gifsicle-${GIFS_VER}-lossy.zip \
# && mv gifsicle/linux/gifsicle-debian6 /usr/local/bin/gifsicle \
# && gifsicle --version
#=================================
# NodeJS so we can install gifify
#=================================
# See gifify options at https://github.com/vvo/gifify#command-line-usage
# some possible versions: v4.3.2, v5.7.1
# ENV NODE_VER="v5.7.1" \
# NODE_PLATFORM="linux-x64" \
# PATH=/usr/local/lib/node/bin:$PATH
# RUN NODE_FIL="node-${NODE_VER}-${NODE_PLATFORM}" \
# && cd /usr/local/lib \
# && wget -nv "https://nodejs.org/dist/${NODE_VER}/${NODE_FIL}.tar.xz" \
# && tar xf ${NODE_FIL}.tar.xz \
# && rm ${NODE_FIL}.tar.* \
# && mv ${NODE_FIL} node \
# && node --version \
# && npm --version \
# && npm install -g gifify \
# && gifify --version
#==========================
# Mozilla Firefox - Latest
#==========================
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# firefox \
# && rm -rf /var/lib/apt/lists/*
# If we are not installing latest from apt sources then remove (purge) default
RUN apt-get -qqy purge firefox
#=========================================================
# Python2 for Supervisor, selenium tests, and other stuff
#=========================================================
RUN apt-get update -qqy \
&& apt-get -qqy install \
python2.7 \
python-pip \
python-openssl \
libssl-dev libffi-dev \
&& pip install --upgrade pip \
&& pip install --upgrade setuptools \
&& pip install --upgrade selenium \
&& rm -rf /var/lib/apt/lists/*
#=========================================
# Python3 for Supervisor, others
#=========================================
# Note Python3 fails installing mozInstall==1.12 with
# NameError: name 'file' is not defined
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# python3.5 \
# python3-pip \
# python3.5-dev \
# python3-openssl \
# libssl-dev libffi-dev \
# && pip3 install --upgrade pip \
# && rm -rf /var/lib/apt/lists/*
ENV CPU_ARCH 64
ENV SEL_HOME ${NORMAL_USER_HOME}/selenium
#===============================
# Mozilla Firefox install tools
#===============================
# ENV FF_LANG "en-US"
# Browser language/locale
# Using mozlog==2.10 or 3.1 to avoid
# AttributeError: 'module' object has no attribute 'getLogger'
# Update BASE_URL
# MOZ_DOWN_SHA="894e579b8de6a0ec05e98ccae8d4c2c730657c19
# RUN mkdir -p ${NORMAL_USER_HOME}/firefox-src \
# && mkdir -p ${SEL_HOME} \
# && pip install mozlog==3.1 \
# && export MOZ_DOWN_SHA="cc7aa3f0d7dee05e92dee0a894dd90cc982a91d8" \
# && pip install \
# "https://github.com/elgalu/mozdownload/zipball/${MOZ_DOWN_SHA}" \
# && pip install mozInstall==1.12 \
# && echo ""
# elgalu fork (no longer working since s3 mozilla changes)
# && export MOZ_DOWN_SHA="aaf77cdbe15e6283654883afcd41d2acaeea7a24" \
# && pip install \
# "https://github.com/elgalu/mozdownload/zipball/${MOZ_DOWN_SHA}" \
# more forks:
# RUN export MOZ_INST_SHA="163e711efb751a80d03d9fb6e2ac0e011902c9df" \
# && export MOZ_DOWN_SHA="028ae444426b6e7691138e88ac306c6f8e6dfd74" \
# && pip install --upgrade requests==2.6.0 \
# && pip install --upgrade \
# "https://github.com/elgalu/mozinstall/zipball/${MOZ_INST_SHA}" \
# && pip install --upgrade \
# "https://github.com/mozilla/mozdownload/zipball/${MOZ_DOWN_SHA}" \
# && mkdir -p ${NORMAL_USER_HOME}/firefox-src
# Notes:
# Always safer to install for git specific commit, in this case
# mozInstall commit 163e711ef dated 2015-06-11 is version 1.12
# && pip install --upgrade mozInstall==1.12 \
# mozdownload commit 028ae4444 dated 2015-03-05 is version 1.14
# && pip install --upgrade mozdownload==1.14 \
#====================
# Supervisor install
#====================
# https://github.com/Supervisor/supervisor
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# supervisor \
# 2016-04-11 commit: 3e541a34a4ab74, version: supervisor-4.0.0.dev0
# 2016-03-06 commit: e4a37c6f8d1cb6, version: supervisor-4.0.0.dev0
# 2016-02-01 commit: eb904ccdb3573e, version: supervisor-4.0.0.dev0
# 2015-06-24 commit: b3ad59703b554f, version: supervisor-4.0.0.dev0
# 2015-08-24 commit: 304b4f388d3e3f, supervisor/version.txt: 4.0.0.dev0
# TODO: Upgrade to supervisor stable 4.0 as soon as is released
RUN SHA="3e541a34a4ab741e67ff4406eb2727599903c6e3" \
&& pip install --upgrade \
"https://github.com/Supervisor/supervisor/zipball/${SHA}" \
&& rm -rf /var/lib/apt/lists/*
#----------------------------#
# FIREFOX_VERSIONS: 24 to 29 #
#----------------------------#
# Will split firefox versions in smaller chunks so the layers are smaller
# All firefox versions we provide from oldes to newest
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS1 "24.0, 25.0.1, 26.0, 27.0.1, 28.0, 29.0.1"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS1} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#------------------------------#
# FIREFOX_VERSIONS: 30, 31, 32 #
#------------------------------#
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS2 "30.0, 31.0, 32.0.3"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS2} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#------------------------------#
# FIREFOX_VERSIONS: 33, 34, 35 #
#------------------------------#
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS3 "33.0.3, 34.0.5, 35.0.1"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS3} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#------------------------------#
# FIREFOX_VERSIONS: 36, 37, 38 #
#------------------------------#
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS4 "36.0.4, 37.0.2, 38.0.6"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS4} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#---------------------#
# FIREFOX_VERSIONS 39 #
#---------------------#
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS5 "39.0.3"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS5} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#-----------#
# dumb-init #
#-----------#
# Use dumb-init to allow `docker stop` to end gracefully
# result: it didn't help
# RUN export DUMB_VERS="1.0.1" \
# && wget -nv -O /tmp/dumb-init.deb \
# "https://github.com/Yelp/dumb-init/releases/download/v${DUMB_VERS}/dumb-init_${DUMB_VERS}_amd64.deb" \
# && dpkg -i /tmp/dumb-init.deb
# ------------------------#
# Sauce Connect Tunneling #
# ------------------------#
# https://docs.saucelabs.com/reference/sauce-connect/
ENV SAUCE_CONN_VER="sc-4.3.16-linux" \
SAUCE_CONN_DOWN_URL="https://saucelabs.com/downloads"
RUN cd /tmp \
&& wget -nv "${SAUCE_CONN_DOWN_URL}/${SAUCE_CONN_VER}.tar.gz" \
&& tar -zxf ${SAUCE_CONN_VER}.tar.gz \
&& rm -rf /usr/local/${SAUCE_CONN_VER} \
&& mv ${SAUCE_CONN_VER} /usr/local \
&& ln -sf /usr/local/${SAUCE_CONN_VER}/bin/sc /usr/local/bin/sc \
&& which sc
# -----------------------#
# BrowserStack Tunneling #
# -----------------------#
# https://www.browserstack.com/local-testing
ENV BSTACK_TUNNEL_URL="https://www.browserstack.com/browserstack-local" \
BSTACK_TUNNEL_ZIP="BrowserStackLocal-linux-x64.zip"
RUN cd /tmp \
&& wget -nv "${BSTACK_TUNNEL_URL}/${BSTACK_TUNNEL_ZIP}" \
&& unzip ${BSTACK_TUNNEL_ZIP} \
&& chmod 755 BrowserStackLocal \
&& rm ${BSTACK_TUNNEL_ZIP} \
&& mv BrowserStackLocal /usr/local/bin \
&& which BrowserStackLocal
#---------------------#
# FIREFOX_VERSIONS 40 #
#---------------------#
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS6 "40.0.3"
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS6} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#-------------------------#
# FIREFOX_VERSIONS Latest #
#-------------------------#
# Install Latest available firefox version
# this also used to work: ENV FIREFOX_LATEST_VERSION latest
#
# Where to find latest version:
# https://archive.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
# https://download-installer.cdn.mozilla.net/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
# https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
# e.g. 44.0 instead of latest
# https://archive.mozilla.org/pub/firefox/releases/44.0/linux-x86_64/en-US/firefox-44.0.tar.bz2
# FF_LANG can be either en-US // de // fr and so on
# Regarding the pip packages, see released versions at:
# https://github.com/mozilla/mozdownload/releases
ENV FF_VER="47.0.1" \
FF_LANG="en-US" \
FF_PLATFORM="linux-x86_64" \
FF_BASE_URL="https://archive.mozilla.org/pub" \
FF_DEST="${SEL_HOME}/firefox"
ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
ENV FF_URL "${FF_BASE_URL}/firefox/releases/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
&& wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
&& bzip2 -d "firefox.tar.bz2" \
&& tar xf "firefox.tar" \
&& rm "firefox.tar"
# && rm -rf ${NORMAL_USER_HOME}/firefox-src
# RUN mkdir -p ${NORMAL_USER_HOME}/firefox-src \
# && cd ${NORMAL_USER_HOME}/firefox-src \
# && mkdir -p ${FIREFOX_DEST} && cd ${FIREFOX_DEST} \
# RUN cd ${NORMAL_USER_HOME}/firefox-src \
# && for FF_VER in $(echo ${FIREFOX_VERSIONS_LAST} | tr "," "\n"); do \
# mozdownload --application=firefox \
# --locale=${FF_LANG} --retry-attempts=1 \
# --platform=linux64 --log-level=WARN --version=${FF_VER} \
# && export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
# && mkdir -p ${FIREFOX_DEST} \
# && mozinstall --app=firefox \
# firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# --destination=${FIREFOX_DEST} \
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
# ;done
#-----------#
# Fix perms #
#-----------#
RUN chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${SEL_HOME} \
&& chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${NORMAL_USER_HOME}
#=====================
# Use Normal User now
#=====================
USER ${NORMAL_USER}
#==========
# Selenium
#==========
ENV SEL_MAJOR_MINOR_VER 2.53
ENV SEL_PATCH_LEVEL_VER 1
RUN mkdir -p ${SEL_HOME} \
&& export SELBASE="https://selenium-release.storage.googleapis.com" \
&& export SELPATH="${SEL_MAJOR_MINOR_VER}/selenium-server-standalone-${SEL_MAJOR_MINOR_VER}.${SEL_PATCH_LEVEL_VER}.jar" \
&& wget -nv ${SELBASE}/${SELPATH} \
-O ${SEL_HOME}/selenium-server-standalone.jar
#==================
# Chrome webdriver
#==================
# How to get cpu arch dynamically: $(lscpu | grep Architecture | sed "s/^.*_//")
ENV CHROME_DRIVER_FILE "chromedriver_linux${CPU_ARCH}.zip"
ENV CHROME_DRIVER_BASE "chromedriver.storage.googleapis.com"
# Gets latest chrome driver version. Or you can hard-code it, e.g. 2.15
RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
# 1st dup line CHROME_DRIVER_VERSION is just to invalidate docker cache
&& CHROME_DRIVER_VERSION="2.22" \
# && CHROME_DRIVER_VERSION=$(curl 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE' 2> /dev/null) \
&& CHROME_DRIVER_URL="https://${CHROME_DRIVER_BASE}/${CHROME_DRIVER_VERSION}/${CHROME_DRIVER_FILE}" \
&& wget -nv -O chromedriver_linux${CPU_ARCH}.zip ${CHROME_DRIVER_URL} \
&& cd ${SEL_HOME} \
&& rm -rf chromedriver \
&& unzip ${NORMAL_USER_HOME}/tmp/chromedriver_linux${CPU_ARCH}.zip \
&& rm ${NORMAL_USER_HOME}/tmp/chromedriver_linux${CPU_ARCH}.zip \
&& mv ${SEL_HOME}/chromedriver \
${SEL_HOME}/chromedriver-$CHROME_DRIVER_VERSION \
&& chmod 755 ${SEL_HOME}/chromedriver-$CHROME_DRIVER_VERSION \
&& ln -s ${SEL_HOME}/chromedriver-${CHROME_DRIVER_VERSION} \
${SEL_HOME}/chromedriver
#========================
# Google Chrome download
#========================
# How to download chrome-deb locally to keep them
# wget -nv -O /tmp/google-chrome-stable_current_amd64.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
# How to get notified of latest version of chrome:
# https://chrome.google.com/webstore/detail/the-latest-versions-of-go/bibclkcoilbnbnppanidhimphmfbjaab
# TODO: Use Google fingerprint to verify downloads
# https://www.google.de/linuxrepositories/
# Also fix .deb file names with correct version
RUN latest_chrome_version_trigger="51.0.2704.106" \
&& mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
&& export CHROME_URL="https://dl.google.com/linux/direct" \
&& wget -nv -O \
${NORMAL_USER_HOME}/chrome-deb/google-chrome-stable_current_amd64.deb \
"${CHROME_URL}/google-chrome-stable_current_amd64.deb"
# Other chrome flavors are commented now since they were not being used:
# && wget -nv -O \
# ${NORMAL_USER_HOME}/chrome-deb/google-chrome-beta_current_amd64.deb \
# "${CHROME_URL}/google-chrome-beta_current_amd64.deb" \
# && wget -nv -O \
# ${NORMAL_USER_HOME}/chrome-deb/google-chrome-unstable_current_amd64.deb \
# "${CHROME_URL}/google-chrome-unstable_current_amd64.deb"
# Where to find old versions of chrome:
# 43, 44, 45, 46 -- https://github.com/elgalu/docker-selenium/releases/tag/2.48.2f
# 47 -- https://github.com/elgalu/docker-selenium/releases/tag/latest
USER root
#=======
# GDebi
#=======
RUN apt-get update -qqy \
&& apt-get -qqy install \
gdebi
#========
# Chrome
#========
ENV CHROME_BASE_DEB_PATH "${NORMAL_USER_HOME}/chrome-deb/google-chrome"
ENV GREP_ONLY_NUMS_VER "[0-9.]{2,20}"
RUN gdebi --non-interactive ${CHROME_BASE_DEB_PATH}-stable_current_amd64.deb \
# Other chrome flavors are commented now since they were not being used:
# && gdebi --non-interactive ${CHROME_BASE_DEB_PATH}-beta_current_amd64.deb \
# && gdebi --non-interactive ${CHROME_BASE_DEB_PATH}-unstable_current_amd64.deb \
&& export CH_STABLE_VER=$(/usr/bin/google-chrome-stable --version | grep -iEo "${GREP_ONLY_NUMS_VER}") \
# && export CH_BETA_VER=$(/usr/bin/google-chrome-beta --version | grep -iEo "${GREP_ONLY_NUMS_VER}") \
# && export CH_UNSTABLE_VER=$(/usr/bin/google-chrome-unstable --version | grep -iEo "${GREP_ONLY_NUMS_VER}") \
&& echo "${CH_STABLE_VER}" \
&& rm ${CHROME_BASE_DEB_PATH}-stable_current_amd64.deb
# && mv ${CHROME_BASE_DEB_PATH}-stable_current_amd64.deb \
# ${CHROME_BASE_DEB_PATH}-stable_${CH_STABLE_VER}_amd64.deb \
# && mv ${CHROME_BASE_DEB_PATH}-beta_current_amd64.deb \
# ${CHROME_BASE_DEB_PATH}-beta_${CH_BETA_VER}_amd64.deb \
# && mv ${CHROME_BASE_DEB_PATH}-unstable_current_amd64.deb \
# ${CHROME_BASE_DEB_PATH}-unstable_${CH_UNSTABLE_VER}_amd64.deb \
# Specifically to have a wrapper for /opt/google/chrome/google-chrome
RUN mv /opt/google/chrome/google-chrome /opt/google/chrome/google-chrome-base
ADD selenium-node-chrome/opt /opt
#==============
# Chromedriver
#==============
RUN ln -s ${SEL_HOME}/chromedriver /usr/bin \
&& chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${SEL_HOME} \
&& rm -rf /var/lib/apt/lists/*
#=========
# GNOME Shell provides core interface functions like switching windows,
# launching applications or see your notifications
#=========
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# gnome-shell \
# && rm -rf /var/lib/apt/lists/*
#=========
# LXDE lxde/lubuntu-desktop
# A Lightweight X11 Desktop Environment
#=========
# NOT working! TODO: see https://github.com/dockerfile/ubuntu-desktop/blob/master/Dockerfile#L13
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# lxde \
# && mkdir -p /usr/share/backgrounds \
# && rm -rf /var/lib/apt/lists/*
#=========
# LightDM is the display manager running in Ubuntu
# A fat and full featured windows manager
#=========
# allowed_users=anybody fixes X: user not authorized to run the X server, aborting
# http://karuppuswamy.com/wordpress/2010/09/26/how-to-fix-x-user-not-authorized-to-run-the-x-server-aborting/
# The issue can be recreated with "ami-ed7c149a" and maybe in CentOS
# ENV XAUTH_DIR /var/lib/lightdm
# ENV XAUTHORITY ${XAUTH_DIR}/.Xauthority
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# lightdm dbus-x11 x11-common \
# && dpkg-reconfigure --frontend noninteractive lightdm x11-common \
# && sed -i 's/allowed_users=console/allowed_users=anybody/g' \
# /etc/X11/Xwrapper.config \
# && touch ${XAUTHORITY} \
# && chmod 666 ${XAUTHORITY} \
# && chown -R ${NORMAL_USER}:${NORMAL_USER} ${XAUTH_DIR} \
# && rm -rf /var/lib/apt/lists/*
#======================
# GNOME ubuntu-desktop
# The fat and full featured windows manager
#======================
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# ubuntu-desktop \
# && rm -rf /var/lib/apt/lists/*
#=================
# Supervisor conf
#=================
ADD supervisor/etc/supervisor/supervisord.conf /etc/supervisor/
ADD **/etc/supervisor/conf.d/* /etc/supervisor/conf.d/
#==============================================
# Java blocks until kernel have enough entropy
# to generate the /dev/random seed
#==============================================
# See: SeleniumHQ/docker-selenium/issues/14
RUN apt-get update -qqy \
&& apt-get -qqy install \
haveged rng-tools \
&& service haveged start \
&& update-rc.d haveged defaults \
&& rm -rf /var/lib/apt/lists/*
#======
# User
#======
USER ${NORMAL_USER}
#===================
# DNS & hosts stuff
#===================
COPY ./dns/etc/hosts /tmp/hosts
#======
# Envs
#======
ENV DEFAULT_SELENIUM_HUB_PORT="24444" \
DEFAULT_SELENIUM_NODE_CH_PORT="25550" \
DEFAULT_SELENIUM_NODE_FF_PORT="25551" \
DEFAULT_VNC_PORT="25900" \
DEFAULT_NOVNC_PORT="26080" \
DEFAULT_SSHD_PORT="22222" \
DEFAULT_SAUCE_LOCAL_SEL_PORT="4445" \
DEFAULT_SUPERVISOR_HTTP_PORT="29001" \
DEFAULT_DISP_N="10"
# Commented for now; all these versions are still available at
# https://github.com/elgalu/docker-selenium/releases/tag/2.47.1m
# ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}, ${FIREFOX_VERSIONS4}, ${FIREFOX_VERSIONS5}, ${FIREFOX_VERSIONS6}, ${FIREFOX_VERSIONS_LAST}" \
# ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS_LAST}" \
# Firefox version to use during run
# For firefox please pick one of $FIREFOX_VERSIONS, default latest
ENV FIREFOX_VERSION="${FF_VER}" \
# Default chrome flavor, options no longer avariable: beta|unstable
CHROME_FLAVOR="stable" \
# Randomize all ports, i.e. pick unused unprivileged ones
PICK_ALL_RANDMON_PORTS="false" \
# User and home
USER="${NORMAL_USER}" \
HOME="${NORMAL_USER_HOME}" \
# Vnc password file
VNC_STORE_PWD_FILE="${NORMAL_USER_HOME}/.vnc/passwd" \
BIN_UTILS="/usr/bin" \
# JVM uses only 1/4 of system memory by default
MEM_JAVA_PERCENT=80 \
# Max amount of time to wait for other processes dependencies
WAIT_TIMEOUT="15s" \
SCREEN_WIDTH=1900 \
SCREEN_HEIGHT=1480 \
SCREEN_MAIN_DEPTH=24 \
SCREEN_SUB_DEPTH=32 \
# Display number; see entry.sh for $DISPLAY
DISP_N="${DEFAULT_DISP_N}" \
# Maximum searches for a free DISPLAY number
MAX_DISPLAY_SEARCH=99 \
SCREEN_NUM=0 \
# ENV XEPHYR_SCREEN_SIZE "${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}"""
# Even though you can change them below, don't worry too much about container
# internal ports since you can map them to the host via `docker run -p`
SELENIUM_HUB_PORT="${DEFAULT_SELENIUM_HUB_PORT}" \
# You may want to connect to another hub
SELENIUM_HUB_PROTO="http" \
SELENIUM_HUB_HOST="127.0.0.1" \
SELENIUM_NODE_HOST="127.0.0.1" \
SELENIUM_NODE_CH_PORT="${DEFAULT_SELENIUM_NODE_CH_PORT}" \
SELENIUM_NODE_FF_PORT="${DEFAULT_SELENIUM_NODE_FF_PORT}" \
# Selenium additional params:
SELENIUM_HUB_PARAMS="" \
SELENIUM_NODE_PARAMS="" \
# To taggle issue #58 see https://goo.gl/fz6RTu
CHROME_ARGS="--no-sandbox" \
# e.g. CHROME_ARGS="--no-sandbox --ignore-certificate-errors" \
# SELENIUM_NODE_CHROME_PARAMS='-Dselenium.chrome.args="--no-sandbox"' \
# WEBDRIVER_NODE_CHROME_PARAMS='-Dwebdriver.chrome.args="--no-sandbox"' \
# Selenium capabilities descriptive (to avoid opera/ie warnings)
# docs at https://code.google.com/p/selenium/wiki/Grid2
MAX_INSTANCES=1 \
MAX_SESSIONS=1 \
SEL_RELEASE_TIMEOUT_SECS=19000 \
SEL_BROWSER_TIMEOUT_SECS=16000 \
SEL_CLEANUPCYCLE_MS=90000 \
SEL_NODEPOLLING_MS=80000 \
# Docker for Mac beta - containers do not start #227
no_proxy=localhost \
HUB_ENV_no_proxy=localhost \
# Xvfb
XVFB_CLI_OPTS_TCP="-nolisten tcp -nolisten inet6" \
XVFB_CLI_OPTS_BASE="-ac -r -cc 4 -accessx -xinerama" \
XVFB_CLI_OPTS_EXT="+extension Composite -extension RANDR +extension GLX" \
# Vnc
VNC_START="true" \
VNC_PORT="${DEFAULT_VNC_PORT}" \
# VNC_CLI_OPTS="-noipv6 -no6 -forever -shared" \
VNC_CLI_OPTS="-forever -shared" \
# You can set the VNC password or leave null so a random password is generated:
# ENV VNC_PASSWORD topsecret
NOVNC_PORT="${DEFAULT_NOVNC_PORT}" \
NOVNC="false" \
SSHD="false" \
SSHD_PORT="${DEFAULT_SSHD_PORT}" \
# Use SSHD_X11FORWARDING=yes to enable ssh -X
SSHD_X11FORWARDING="no" \
# Use SSHD_GATEWAYPORTS=yes for reverse ports tunneling
SSHD_GATEWAYPORTS="no" \
# Supervisor (process management) http server
SUPERVISOR_HTTP_PORT="${DEFAULT_SUPERVISOR_HTTP_PORT}" \
SUPERVISOR_HTTP_USERNAME="supervisorweb" \
SUPERVISOR_HTTP_PASSWORD="somehttpbasicauthpwd" \
SUPERVISOR_REQUIRED_SRV_LIST="xmanager" \
SUPERVISOR_NOT_REQUIRED_SRV_LIST1="ignoreMe" \