Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
vms:webdev:fabric [2017/03/17 01:26] admin [Docker Engine] |
vms:webdev:fabric [2017/03/17 03:48] admin [Fabric Components] |
||
---|---|---|---|
Line 68: | Line 68: | ||
> curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | > curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | ||
OK | OK | ||
- | > sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | + | |
+ | > sudo nano /etc/apt/sources.list.d/docker.list | ||
+ | ADD | ||
+ | deb https://apt.dockerproject.org/repo debian-jessie main | ||
> sudo apt-get update | > sudo apt-get update | ||
- | > apt-cache madison docker-ce | + | > apt-cache madison docker-engine |
- | docker-ce | 17.03.0~ce-0~debian-jessie | https://download.docker.com/linux/debian/ jessie/stable amd64 Packages | + | ... |
+ | docker-engine | 1.13.0-0~debian-jessie | https://apt.dockerproject.org/repo/ debian-jessie/main amd64 Packages | ||
+ | docker-engine | 1.12.6-0~debian-jessie | https://apt.dockerproject.org/repo/ debian-jessie/main amd64 Packages | ||
+ | docker-engine | 1.12.5-0~debian-jessie | https://apt.dockerproject.org/repo/ debian-jessie/main amd64 Packages | ||
+ | ... | ||
+ | > sudo apt-get install docker-engine=1.12.6-0~debian-jessie | ||
+ | </code> | ||
- | [sudo apt-get install docker-ce] | + | === Complementary actions === |
+ | Now, as we do not want to //automatically upgrade// the ''docker-engine'' package when using ''apt-get upgrade'', we'll **put the package on hold**: | ||
+ | <code> | ||
+ | > sudo apt-mark hold docker-engine | ||
</code> | </code> | ||
- | The recommended Docker version being 1.12.x we're not going to use the repository method but rather go for the DEB archive: | + | To remove the hold: |
+ | <code> | ||
+ | > sudo apt-mark unhold docker-engine | ||
+ | </code> | ||
+ | Start and Autostart Docker: | ||
<code> | <code> | ||
- | > sudo nano /etc/apt/source.list | + | > sudo systemctl start docker |
- | COMMENT OUT: | + | > sudo systemctl enable docker |
- | # deb [arch=amd64] https://download.docker.com/linux/debian jessie stable | + | Synchronizing state for docker.service with sysvinit using update-rc.d... |
- | > sudo apt-get update | + | Executing /usr/sbin/update-rc.d docker defaults |
+ | Executing /usr/sbin/update-rc.d docker enable | ||
</code> | </code> | ||
- | === Specific version === | + | Docker status: |
- | A list of Docker versions is available [[https://docs.docker.com/docsarchive/#v1703-current|on the Docker website]]. | + | <code> |
+ | > systemctl status docker | ||
+ | ● docker.service - Docker Application Container Engine | ||
+ | Loaded: loaded (/lib/systemd/system/docker.service; enabled) | ||
+ | Active: active (running) since Fri 2017-03-17 02:03:28 CET; 11min ago | ||
+ | Docs: https://docs.docker.com | ||
+ | Main PID: 10340 (dockerd) | ||
+ | CGroup: /system.slice/docker.service | ||
+ | ├─10340 /usr/bin/dockerd -H fd:// | ||
+ | └─10344 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0 -... | ||
+ | </code> | ||
+ | === Check Docker is functioning === | ||
+ | <code> | ||
+ | > sudo docker run hello-world | ||
+ | ... | ||
+ | Hello from Docker! | ||
+ | This message shows that your installation appears to be working correctly. | ||
+ | ... | ||
+ | </code> | ||
==== Docker Compose ==== | ==== Docker Compose ==== | ||
+ | From [[https://www.linuxbabe.com/linux-server/install-docker-on-debian-8-jessie-server|linuxable.com]].\\ | ||
+ | For a list of Docker-compose versions, see [[https://github.com/docker/compose/releases|this GitHub page]]. | ||
+ | |||
+ | <code> | ||
+ | > su | ||
+ | > curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | ||
+ | > chmod +x /usr/local/bin/docker-compose | ||
+ | > docker-compose --version | ||
+ | docker-compose version 1.8.1, build 878cff1 | ||
+ | > exit | ||
+ | </code> | ||
+ | |||
+ | ==== GIT ==== | ||
+ | |||
+ | <code> | ||
+ | > sudo apt-get install git-core | ||
+ | </code> | ||
+ | |||
+ | ===== Fabric Components ===== | ||
+ | |||
+ | === Command line tools === | ||
+ | <code> | ||
+ | > npm install -g composer-cli | ||
+ | </code> | ||
+ | |||
+ | === Clone and install the Sample Applications === | ||
+ | <code> | ||
+ | > git clone https://github.com/fabric-composer/sample-applications.git | ||
+ | > cd sample-applications/packages/getting-started | ||
+ | > npm install | ||
+ | </code> | ||
+ | |||
+ | Had to run the ''npm-install'' command as root, otherwise couldn't connect to docker deamon:\\ | ||
+ | > docker pull hyperledger/fabric-baseimage:x86_64-0.1.0 | ||
+ | > Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/ | ||
+ | > Cannot connect to the Docker daemon. Is the docker daemon running on this host? | ||
+ | |||
+ | This required to add the following in /root/.bashrc: | ||
+ | <code> | ||
+ | export NVM_DIR="/home/sysadmin/.nvm" | ||
+ | [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | ||
+ | </code> |