2016-04-05 26 views
1

我從here複製粘貼官方硒網格中心的dockerfile。官方Selenium Hub docker鏡像的自定義返回'權限被拒絕'

我想定製它的配置文件,所以不是複製[複製],而是將它們添加到gist網址中。

所以這樣的:

COPY generate_config /opt/selenium/generate_config 
COPY entry_point.sh /opt/bin/entry_point.sh 

變成這樣:

ADD https://gist.githubusercontent.com/myaccount/d5203b3e/raw/d8dfcd9fd/generate_config /opt/selenium/generate_config 
ADD https://gist.githubusercontent.com/myaccount/gfsfe2fc/raw/fdefe4e06/entry_point.sh /opt/bin/entry_point.sh 

我在Win10和內部Kitematic使用泊塢窗工具箱我看到這一點:

hub logs

上午我做錯了什麼?

我錯過了什麼嗎?

這是否與操作系統的差異有關?

是不是這個dockerfile的目的,使建立一個跨平臺的圖像?

-EDIT- 另外... 與Selenium網格node-firefox dockerfile發生相關的事情。

從Kitematic我得到這個:

node-firefox logs

回答

1

你應該添加類似的後面添加以下到您的Dockerfile命令:

RUN chmod a+x /opt/bin/entry_point.sh \ 
    && chmod a+x /opt/selenium/generate_config 

這是因爲當文件被添加到COPY圖像已經具有對主機的執行權限(保留),但是當您使用ADD從遠程源添加它們時,它們不會自動獲得執行權限。