docker文件中的Tee命令
我正在尝试使用下面的dockerfile安装RejectionDBdocker文件中的Tee命令,docker,rethinkdb,Docker,Rethinkdb,我正在尝试使用下面的dockerfile安装RejectionDB RUN /bin/bash -c "source /etc/lsb-release" && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | tee "/etc/apt/sources.list.d/rethinkdb.list" RUN wget -qO- https://download.rethinkd
RUN /bin/bash -c "source /etc/lsb-release" && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | tee "/etc/apt/sources.list.d/rethinkdb.list"
RUN wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
RUN sudo apt-get update
RUN sudo apt-get install rethinkdb
安装失败。下面是输出
输出:
Step 22/23 : RUN sudo apt-get update
---> Running in 54d07239b6f3
E: Malformed entry 1 in list file /etc/apt/sources.list.d/rethinkdb.list (Component)
E: The list of sources could not be read.
The command '/bin/sh -c sudo apt-get update' returned a non-zero code: 100
似乎源列表写得不正确。
任何帮助都将不胜感激。
提前感谢。您的源命令不会将变量从/etc/lsb release传输到echo命令。你需要这样的东西:
RUN /bin/bash -c 'source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main"' | tee "/etc/apt/sources.list.d/rethinkdb.list"
谢谢,很好用。