Skip to content

Commit 9e2d610

Browse files
committed
generic namespacing (allow others to easily customize image names)
1 parent c256bbb commit 9e2d610

File tree

28 files changed

+71
-54
lines changed

28 files changed

+71
-54
lines changed

Base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ubuntu:16.04
2-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
2+
LABEL authors="Selenium <selenium-developers@googlegroups.com>"
33

44
#================================================
55
# Customize sources for apt-get

Hub/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55
FROM selenium/base:3.4.0-bismuth
6-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
6+
LABEL authors=SeleniumHQ
77

88
#========================
99
# Selenium Configuration

Hub/Dockerfile.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
2-
31
#========================
42
# Selenium Configuration
53
#========================

Hub/generate.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/bin/bash
22
VERSION=$1
3+
NAMESPACE=$2
4+
AUTHORS=$3
35

46
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" > ./Dockerfile
57
echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile
68
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile
79
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile
8-
echo FROM selenium/base:$VERSION >> ./Dockerfile
10+
echo FROM $NAMESPACE/base:$VERSION >> ./Dockerfile
11+
echo LABEL authors="$AUTHORS" >> ./Dockerfile
12+
echo "" >> ./Dockerfile
913
cat ./Dockerfile.txt >> ./Dockerfile

Makefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
NAME := selenium
22
VERSION := $(or $(VERSION),$(VERSION),3.4.0-bismuth)
3+
NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME))
4+
AUTHORS := $(or $(AUTHORS),$(AUTHORS),SeleniumHQ)
35
PLATFORM := $(shell uname -s)
46
BUILD_ARGS := $(BUILD_ARGS)
57
MAJOR := $(word 1,$(subst ., ,$(VERSION)))
@@ -29,67 +31,67 @@ base:
2931
cd ./Base && docker build $(BUILD_ARGS) -t $(NAME)/base:$(VERSION) .
3032

3133
generate_hub:
32-
cd ./Hub && ./generate.sh $(VERSION)
34+
cd ./Hub && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS)
3335

3436
hub: base generate_hub
3537
cd ./Hub && docker build $(BUILD_ARGS) -t $(NAME)/hub:$(VERSION) .
3638

3739
generate_nodebase:
38-
cd ./NodeBase && ./generate.sh $(VERSION)
40+
cd ./NodeBase && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS)
3941

4042
nodebase: base generate_nodebase
4143
cd ./NodeBase && docker build $(BUILD_ARGS) -t $(NAME)/node-base:$(VERSION) .
4244

4345
generate_chrome:
44-
cd ./NodeChrome && ./generate.sh $(VERSION)
46+
cd ./NodeChrome && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS)
4547

4648
chrome: nodebase generate_chrome
4749
cd ./NodeChrome && docker build $(BUILD_ARGS) -t $(NAME)/node-chrome:$(VERSION) .
4850

4951
generate_firefox:
50-
cd ./NodeFirefox && ./generate.sh $(VERSION)
52+
cd ./NodeFirefox && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS)
5153

5254
firefox: nodebase generate_firefox
5355
cd ./NodeFirefox && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox:$(VERSION) .
5456

5557
generate_standalone_firefox:
56-
cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox Firefox $(VERSION)
58+
cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox Firefox $(VERSION) $(NAMESPACE) $(AUTHORS)
5759

5860
standalone_firefox: generate_standalone_firefox firefox
5961
cd ./StandaloneFirefox && docker build $(BUILD_ARGS) -t $(NAME)/standalone-firefox:$(VERSION) .
6062

6163
generate_standalone_firefox_debug:
62-
cd ./StandaloneDebug && ./generate.sh StandaloneFirefoxDebug standalone-firefox Firefox $(VERSION)
64+
cd ./StandaloneDebug && ./generate.sh StandaloneFirefoxDebug standalone-firefox Firefox $(VERSION) $(NAMESPACE) $(AUTHORS)
6365

6466
standalone_firefox_debug: generate_standalone_firefox_debug standalone_firefox
6567
cd ./StandaloneFirefoxDebug && docker build $(BUILD_ARGS) -t $(NAME)/standalone-firefox-debug:$(VERSION) .
6668

6769
generate_standalone_chrome:
68-
cd ./Standalone && ./generate.sh StandaloneChrome node-chrome Chrome $(VERSION)
70+
cd ./Standalone && ./generate.sh StandaloneChrome node-chrome Chrome $(VERSION) $(NAMESPACE) $(AUTHORS)
6971

7072
standalone_chrome: generate_standalone_chrome chrome
7173
cd ./StandaloneChrome && docker build $(BUILD_ARGS) -t $(NAME)/standalone-chrome:$(VERSION) .
7274

7375
generate_standalone_chrome_debug:
74-
cd ./StandaloneDebug && ./generate.sh StandaloneChromeDebug standalone-chrome Chrome $(VERSION)
76+
cd ./StandaloneDebug && ./generate.sh StandaloneChromeDebug standalone-chrome Chrome $(VERSION) $(NAMESPACE) $(AUTHORS)
7577

7678
standalone_chrome_debug: generate_standalone_chrome_debug standalone_chrome
7779
cd ./StandaloneChromeDebug && docker build $(BUILD_ARGS) -t $(NAME)/standalone-chrome-debug:$(VERSION) .
7880

7981
generate_chrome_debug:
80-
cd ./NodeDebug && ./generate.sh NodeChromeDebug node-chrome Chrome $(VERSION)
82+
cd ./NodeDebug && ./generate.sh NodeChromeDebug node-chrome Chrome $(VERSION) $(NAMESPACE) $(AUTHORS)
8183

8284
chrome_debug: generate_chrome_debug chrome
8385
cd ./NodeChromeDebug && docker build $(BUILD_ARGS) -t $(NAME)/node-chrome-debug:$(VERSION) .
8486

8587
generate_firefox_debug:
86-
cd ./NodeDebug && ./generate.sh NodeFirefoxDebug node-firefox Firefox $(VERSION)
88+
cd ./NodeDebug && ./generate.sh NodeFirefoxDebug node-firefox Firefox $(VERSION) $(NAMESPACE) $(AUTHORS)
8789

8890
firefox_debug: generate_firefox_debug firefox
8991
cd ./NodeFirefoxDebug && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox-debug:$(VERSION) .
9092

9193
generate_phantomjs:
92-
cd ./NodePhantomJS && ./generate.sh $(VERSION)
94+
cd ./NodePhantomJS && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS)
9395

9496
phantomjs: nodebase generate_phantomjs
9597
cd ./NodePhantomJS && docker build $(BUILD_ARGS) -t $(NAME)/node-phantomjs:$(VERSION) .

NodeBase/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55
FROM selenium/base:3.4.0-bismuth
6-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
6+
LABEL authors=SeleniumHQ
77

88
ENV DEBIAN_FRONTEND noninteractive
99
ENV DEBCONF_NONINTERACTIVE_SEEN true
@@ -15,7 +15,6 @@ RUN apt-get update -qqy \
1515
&& apt-get -qqy install \
1616
locales \
1717
xvfb \
18-
dbus \
1918
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
2019

2120
#==============================

NodeBase/Dockerfile.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
2-
31
ENV DEBIAN_FRONTEND noninteractive
42
ENV DEBCONF_NONINTERACTIVE_SEEN true
53

NodeBase/generate.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/bin/bash
22
VERSION=$1
3+
NAMESPACE=$2
4+
AUTHORS=$3
35

46
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" > ./Dockerfile
57
echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile
68
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile
79
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile
8-
echo FROM selenium/base:$VERSION >> ./Dockerfile
10+
echo FROM $NAMESPACE/base:$VERSION >> ./Dockerfile
11+
echo LABEL authors="$AUTHORS" >> ./Dockerfile
12+
echo "" >> ./Dockerfile
913
cat ./Dockerfile.txt >> ./Dockerfile

NodeChrome/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55
FROM selenium/node-base:3.4.0-bismuth
6-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
6+
LABEL authors=SeleniumHQ
77

88
USER root
99

@@ -62,15 +62,14 @@ COPY generate_config /opt/selenium/generate_config
6262
RUN chmod +x /opt/selenium/generate_config
6363

6464
#=================================
65-
# Chrome Launch Script Modication
65+
# Chrome Launch Script Modification
6666
#=================================
6767
COPY chrome_launcher.sh /opt/google/chrome/google-chrome
6868
RUN chmod +x /opt/google/chrome/google-chrome
6969

7070
RUN chown -R seluser:seluser /opt/selenium
7171

72-
# Following line fixes
73-
# https://github.com/SeleniumHQ/docker-selenium/issues/87
74-
RUN echo "DBUS_SESSION_BUS_ADDRESS=/dev/null" >> /etc/environment
72+
# Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87
73+
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
7574

76-
USER seluser
75+
USER seluser

NodeChrome/Dockerfile.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
MAINTAINER Selenium <selenium-developers@googlegroups.com>
2-
31
USER root
42

53
#============================================

0 commit comments

Comments
 (0)