簡體   English   中英

不允許Docker構建Gentoo操作

[英]Docker build Gentoo operation not permitted

我有一個docker-compose與此容器來構建Gentoo

default:
    build: docker/gentoo
    hostname: default.jpo.net

我的用於在多階段構建中設置Gentoo的Dockerfile是

FROM gentoo/portage as portage

FROM gentoo/stage3-amd64

COPY --from=portage /usr/portage /usr/portage

RUN emerge --jobs $(nproc) -qv www-servers/apache net-misc/curl net-misc/openssh

RUN /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
RUN /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
RUN sed -i 's/#PubkeyAuthentication/PubkeyAuthentication/' /etc/ssh/sshd_config
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh && touch /root/.ssh/authorized_keys

RUN wget -O telegraf.tar.gz http://get.influxdb.org/telegraf/telegraf-0.11.1-1_linux_amd64.tar.gz \
    && tar xvfz telegraf.tar.gz \
    && rm telegraf.tar.gz \
    && mv /usr/lib/telegraf /usr/lib64/telegraf \
    && rm -rf /usr/lib && ln -s /usr/lib64 /usr/lib

ADD telegraf.conf /etc/telegraf/telegraf.conf

COPY entrypoint.sh /
COPY infinite_curl.sh /
RUN chmod u+x /entrypoint.sh /infinite_curl.sh
ENTRYPOINT ["/entrypoint.sh"]

CMD ["telegraf", "-config", "/etc/telegraf/telegraf.conf"]

問題是在安裝軟件包的emerge命令期間,構建失敗。

然后我得到這個錯誤

PermissionError: [Errno 1] Operation not permitted
 * ERROR: dev-libs/apr-1.5.2::gentoo failed (install phase):
 *   dodoc failed

我嘗試在docker-compose文件中添加privileged=true ,並在Dockerfile中添加USER root而沒有成功。

我也嘗試使用最新版本的openssh沒有成功。 我搜索了Internet,但沒有找到任何成功的消息。

Docker版本

Docker version 17.12.0-ce, build c97c6d6

Docker-compose版本

docker-compose version 1.18.0, build 8dd22a9

我在Ubuntu 16.04上,此版本在具有相同docker / docker-compose版本的Ubuntu 17.10上運行良好

你有一些線索嗎?

src-install()查看該ebuild ,這似乎是上游的錯誤。

#自4月1.5.1起,安裝中斷

#make -j1 DESTDIR =“ $ {D}”安裝||

有幾個與並行構建apr相關的錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM