如何在jenkinsci / blueocean中安装docker-compose?

时间:2018-04-28 08:24:20

标签: docker jenkins docker-compose jenkins-blueocean

docker图片jenkinsci/blueocean似乎是正式的,因为官方文件中提到了图片。

我想在容器中运行docker-compose命令,但此图片仅包含docker但不包含docker-compose

因此,我试图在容器内部安装docker-compose

$ curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose

它看起来已成功安装,但是,当我运行docker-compose --version时,它会返回bash: ./docker-compose: No such file or directory,即使我可以在docker-compose看到$(which docker-compose)可执行文件。

(此错误与$PATH无关,我试图直接在docker-compose所在的目录中运行

如何在图片中安装docker-compose,也就是说,如何根据docker-compose构建包含jenkinsci/blueocean的新图片?

2 个答案:

答案 0 :(得分:1)

对我来说,"INSTALL AS A CONTAINER"的解决方案 这是

$("#produkttable tr").click(function() {
                        id = $(this).attr('id');        
                    });

答案 1 :(得分:0)

你需要添加glibc:

FROM jenkinsci/blueocean

USER root

RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
    chmod +x /usr/local/bin/docker-compose

RUN apk add ca-certificates wget && \
    wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
    GLIBC_VERSION='2.27-r0' && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && apk add glibc-${GLIBC_VERSION}.apk && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk && apk add glibc-bin-${GLIBC_VERSION}.apk