Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install docker-compose offline?

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?

like image 860
NotSoShabby Avatar asked Dec 02 '18 08:12

NotSoShabby


People also ask

Can I install docker offline?

To install Docker on your offline server, first download the required RPM packages onto an online server that is connected to the Red Hat repository, and then transfer the RPM packages to your offline server for installation.

Can you install Docker Compose without docker?

You can also run docker-compose up as per normal but without needing Docker Desktop.

Does Docker Compose need to be installed?

If you are on a Linux machine, you will need to install Docker Compose. After installation, you should be able to run the following and see version information.


2 Answers

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/

like image 198
Muralidharan.rade Avatar answered Sep 28 '22 13:09

Muralidharan.rade


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

like image 38
Ortomala Lokni Avatar answered Sep 28 '22 12:09

Ortomala Lokni