Hi,
I installed Docker-machine and Docker-compose in my container via the Dockefile:
FROM martinezko/alpine-meteor:latest
RUN apk add --update curl && \
rm -rf /var/cache/apk/*
RUN apk add --no-cache docker
RUN curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
RUN curl -L https://github.com/docker/machine/releases/download/v0.9.0/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
but I can only use docker-machine. When I want to use docker-compose it says:
bash-4.3# ls /usr/local/bin/
docker-compose docker-machine
bash-4.3# stat /usr/local/bin/docker-compose
File: /usr/local/bin/docker-compose
Size: 8273264 Blocks: 16160 IO Block: 4096 regular file
Device: fd09h/64777d Inode: 29362189 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-05-23 07:14:43.000000000
Modify: 2017-05-23 07:08:17.000000000
Change: 2017-05-23 07:14:23.000000000
bash-4.3# docker-compose
bash: /usr/local/bin/docker-compose: No such file or directory
any ideas ?
[EDIT] The docker-machine who works perfectly has the same right:
bash-4.3# stat /usr/local/bin/docker-machine
File: /usr/local/bin/docker-machine
Size: 25287328 Blocks: 49392 IO Block: 4096 regular file
Device: fd09h/64777d Inode: 29362188 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-05-23 07:14:28.000000000
Modify: 2017-05-23 07:08:07.000000000
Change: 2017-05-23 07:14:22.000000000
I followed https://wiki.alpinelinux.org/wiki/Docker#Docker_Compose and it's ok now
You need to install glibc, e.g.
# Based on https://github.com/sgerrand/alpine-pkg-glibc/
apk add ca-certificates wget
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/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
It's better to install it via pip
, less hassle.
apk add py-pip
pip install docker-compose
Following worked for me:
RUN cd /tmp/ && \
wget --no-check-certificate -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-bin-2.31-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-i18n-2.31-r0.apk && \
apk add glibc-2.31-r0.apk glibc-bin-2.31-r0.apk glibc-i18n-2.31-r0.apk && \
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \
rm -rf /tmp/* && \
cd - && \
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
sudo chmod +x /usr/local/bin/docker-compose && \
sudo ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose
Most helpful comment
You need to install glibc, e.g.