11

I would like to download docker-compose on one machine and install it on another (this other machine is not connected to the internet).

I tried downloading the binary file, making a docker-compose directory under /usr/bin (where docker is) and ran chmod +x on the directory. That didnt help.

Also the Alternative Install Options link in the docs is broken :/

Any help?

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
NotSoShabby
  • 3,316
  • 9
  • 32
  • 56

3 Answers3

16

In situations when installing via pip or as docker container (https://docs.docker.com/compose/install/) is also not an option, the following option can help:

Download the package in a system with connectivity (replace the needed version as required)

wget https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64

Just rename the package

mv docker-compose-Linux-x86_64 docker-compose

Copy it (ssh) to the required system

To make it executable

sudo mv docker-compose /usr/local/bin/
sudo chmod +x /usr/local/bin/docker-compose

Refer the post for more details: http://muralitechblog.com/how-to-install-docker-compose-offline/

Paul P
  • 3,346
  • 2
  • 12
  • 26
Muralidharan.rade
  • 2,226
  • 1
  • 24
  • 34
4

According to the Docker documentation, you can install docker-compose with pip:

Compose can be installed from pypi using pip. If you install using pip, we recommend that you use a virtualenv because many operating systems have python system packages that conflict with docker-compose dependencies.

And pip packages can be installed offline : Python Packages Offline Installation

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
0

From the docker github page docker compose github releases.

curl -L https://github.com/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o docker-compose && chmod +x docker-compose

This will fetch the file applicable to the OS that you run the command for.

To find the latest version follow this link Latest Docker Compose Releases If you need to retrieve a version for an offline OS, on that OS run the following commands to determine the version. NOTE: This is for linux and macOS varieties only.

To determine the OS

uname -s

To determine the architecture:

uname -m
sweetfa
  • 5,457
  • 2
  • 48
  • 62