mirror of
https://github.com/docker/compose.git
synced 2025-07-21 20:54:32 +02:00
Merge pull request #1587 from gtardif/cli_plugin_linux_install
Install compose cli plugin in addition to compose-cli binary with scripted install
This commit is contained in:
commit
61a448226b
@ -120,6 +120,7 @@ if [ $(is_new_cli "docker") -eq 1 ]; then
|
|||||||
$sh_c "${download_cmd} ${download_dir}/docker-compose-cli.tar.gz ${DOWNLOAD_URL}"
|
$sh_c "${download_cmd} ${download_dir}/docker-compose-cli.tar.gz ${DOWNLOAD_URL}"
|
||||||
$sh_c "tar xzf ${download_dir}/docker-compose-cli.tar.gz -C ${download_dir} --strip-components 1"
|
$sh_c "tar xzf ${download_dir}/docker-compose-cli.tar.gz -C ${download_dir} --strip-components 1"
|
||||||
$sudo_sh_c "install -m 775 ${download_dir}/docker /usr/local/bin/docker"
|
$sudo_sh_c "install -m 775 ${download_dir}/docker /usr/local/bin/docker"
|
||||||
|
$sh_c "mkdir -p ~/.docker/cli-plugins && cp ${download_dir}/docker-compose ~/.docker/cli-plugins/docker-compose"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "You already have the Docker Compose CLI installed, in a different location."
|
echo "You already have the Docker Compose CLI installed, in a different location."
|
||||||
@ -185,6 +186,8 @@ $sudo_sh_c "ln -s ${existing_cli_path} ${link_path}"
|
|||||||
|
|
||||||
# Install downloaded CLI
|
# Install downloaded CLI
|
||||||
$sudo_sh_c "install -m 775 ${download_dir}/docker /usr/local/bin/docker"
|
$sudo_sh_c "install -m 775 ${download_dir}/docker /usr/local/bin/docker"
|
||||||
|
# Install Compose CLI plugin
|
||||||
|
$sh_c "mkdir -p ~/.docker/cli-plugins && cp ${download_dir}/docker-compose ~/.docker/cli-plugins/docker-compose"
|
||||||
|
|
||||||
# Clear cache
|
# Clear cache
|
||||||
cleared_cache=1
|
cleared_cache=1
|
||||||
|
@ -37,6 +37,7 @@ RUN sudo chmod +x /scripts/install_linux.sh
|
|||||||
ARG DOWNLOAD_URL=
|
ARG DOWNLOAD_URL=
|
||||||
RUN DOWNLOAD_URL=${DOWNLOAD_URL} /scripts/install_linux.sh
|
RUN DOWNLOAD_URL=${DOWNLOAD_URL} /scripts/install_linux.sh
|
||||||
RUN docker version | grep Cloud
|
RUN docker version | grep Cloud
|
||||||
|
RUN sh -c "docker info || true" | grep "compose: Docker Compose (Docker Inc.,"
|
||||||
|
|
||||||
FROM install AS upgrade
|
FROM install AS upgrade
|
||||||
|
|
||||||
@ -45,6 +46,7 @@ WORKDIR /home/newuser
|
|||||||
|
|
||||||
RUN DOWNLOAD_URL=${DOWNLOAD_URL} /scripts/install_linux.sh
|
RUN DOWNLOAD_URL=${DOWNLOAD_URL} /scripts/install_linux.sh
|
||||||
RUN docker version | grep Cloud
|
RUN docker version | grep Cloud
|
||||||
|
RUN sh -c "docker info || true" | grep "compose: Docker Compose (Docker Inc.,"
|
||||||
|
|
||||||
# To run this test locally, start an HTTP server that serves the dist/ folder
|
# To run this test locally, start an HTTP server that serves the dist/ folder
|
||||||
# then run a docker build passing the DOWNLOAD_URL as a build arg:
|
# then run a docker build passing the DOWNLOAD_URL as a build arg:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user