Categories

Raspberry – Installation docker raspbian

root@raspberrypi:/home/pi# curl -sSL https://get.docker.com | sh WARNING: raspbian is no longer updated @ https://get.docker.com/ Installing the legacy docker-engine package… + sh -c sleep 3; apt-get update Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB] Get:2 http://archive.raspberrypi.org jessie InRelease [22.9 kB] Get:3 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,533 kB] Get:4 http://archive.raspberrypi.org jessie/main armhf Packages [169 kB] Get:5 http://archive.raspberrypi.org jessie/ui […]

Debian – Jessie – Installation docker-ce

 

Script d’installation DOCKER CE

root@srv-khanh78:/data/DOCKER/DEBIAN# cat debian-install-docker-ce.sh #!/bin/bash

# https://docs.docker.com/engine/installation/linux/docker-ce/debian/#docker-ee-customers

sudo apt-get remove docker docker-engine docker.io cp -p /etc/apt/source.list /etc/apt/source.list.`date ‘+%d%m%Y’` echo “deb http://mirror.cc.columbia.edu/debian jessie main contrib non-free” >>/etc/apt/source.list sudo apt-get update

sudo apt-get dist-upgrade -y

sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | sudo […]

Debian – Docker – workpress-apache2-php7 / mariadb / phpmyadmin / portainer

Pré-requis : installer docker.io et docker-compose

4 containers :

wordpress-php7.1 phpmyadmin mariadb -> base de données portainer –> gestion du container

Créer l’image wordpress et php7 à partir du GIT

mkdir /root/wordpress

cd /root/wordpress

git clone https://github.com/docker-library/wordpress.git .

Cloning into ‘.’…

remote: Counting objects: 641, done.

remote: Compressing objects: 100% (23/23), done.

remote: Total 641 […]

Debian – Docker – installation docker-compse

Script d’installation docker-compose Debian jessie

root@srv-khanh78:/data/DOCKER/DEBIAN# cat debian-install-docker-compose.sh #!/bin/bash # get latest docker compose released tagCOMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep ‘tag_name’ | cut -d\” -f4) COMPOSE_VERSION=1.12.0

# Install docker-compose

curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

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

curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose /usr/local/bin/docker-compose –version root@srv-khanh78:/data/DOCKER/DEBIAN# #!/bin/bash

# get latest docker compose released tag

[…]

Debian – Docker push hub.docker.com

Déposer l’image sur le cloud hub.docker.com

root@debian8:~/GISPRO# docker images

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

apache2php7qgis latest 9146cf511785 26 minutes ago 919.4 MB

khanh78/apache2php7 latest 6ef28d59e9b4 About an hour ago 358.2 MB

debian latest 0aa3f9bb64ef 4 weeks ago 123.4 MB

Se logger sur le site :

root@debian8:~/GISPRO# docker login

Username: khanh78

Password:

Email: khanh.dinh@free.fr

[…]

Debian – Docker Container Apache2 – PHP7

Create container – Apach2 and PHP7

Create Dockerfile

root@debian8:~/GISPRO# more Dockerfile

#Docker file Apache 2 + PHP 7.0

FROM debian

MAINTAINER khanh dinh / docker-apache2-php7.0

RUN export DEBIAN_FRONTEND=noninteractive

ENV DEBIAN_FRONTEND noninteractive

RUN dpkg-divert –local –rename –add /sbin/initctl

RUN apt-get update

RUN apt-get install -y wget apt-utils

#add

RUN echo “deb http://packages.dotdeb.org jessie all” > /etc/apt/sources.list.d/dotdeb.list

[…]

Debian : – Docker – container glances

Exemple de création d’un conteneur :

créer un fichier Dockerfile

root@debian8:~/docker/glances# cat Dockerfile # # Glances Dockerfile # # https://github.com/khanh78/debian-glances # # Pull base image. FROM debian MAINTAINER Khanh, khanh.dinh@free.fr

# Make sure the package repository is up to date RUN apt-get -y update# Install Glances

#Install Glances RUN apt-get install -y glances

2. Lancer […]

Debian – Docker Lizmap

Test docker Lizmap

Installer docker sur Debian 8 (Installation Docker) Le container khanh78/debian-lizmap contient les produits suivants : Apache 2 , PHP 7 , Qgis , Lizmap

 

 

Récupérer l’image

root@qgis:~# docker pull khanh78/lizmap-debian latest: Pulling from khanh78/lizmap-debian 4d43e3e8873c: Pull complete cfbc775b0fa8: Pull complete b0b3dee9e9c7: Pull complete 5d37079dc56a: Already exists Digest: sha256:06651a0e4f6e1a4bf9d554e13f435a1d896341a9281375c53585f5c549810196 Status: […]

Debian – Docker Portainer UI

root@debian:~# docker pull portainer/portainer latest: Pulling from portainer/portainer 3690474eb5b4: Pull complete 8b6c06755057: Pull complete 25f5b35443a5: Pull complete 6a99b8e76d78: Pull complete 47501d4299e7: Pull complete 051ffa2f51b0: Pull complete f4557f58f23b: Pull complete Digest: sha256:25cec153060b708a86f5a4c8ab26d26e3713e78e4ec6b488040e2a96bcf538b8 Status: Downloaded newer image for portainer/portainer:latest root@debian:~#

root@debian:~# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE portainer/portainer latest f4557f58f23b 2 days ago 9.256 […]

Debian – Installer docker sous Debian 8 Jessie

Configurer l’accès au repository : /etc/apt/source.list

#—————————————————————————————– # Security deb http://security.debian.org/ jessie/updates main contrib non-free deb-src http://security.debian.org/ jessie/updates main contrib non-free

# France mirror deb http://ftp.fr.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.fr.debian.org/debian/ jessie main contrib non-free

#Docker deb http://http.debian.net/debian jessie-backports main #—————————————————————————————

Faire la mise à jour de Debian #apt-get update && apt-get upgrade -y

[…]