Docker quick guide

Docker quick guide

Postby Antonio Linares » Thu Mar 14, 2019 10:05 am

// Download linux debian
docker pull debian

// run debian interactively
docker run -it debian /bin/bash

// once inside debian, install mc (midnight commander)
apt-get update
apt-get install mc
mc
exit (to exit from debian)

// to save the docker image changes !!!
docker ps -a (check your image id)
docker commit id my_debian
docker images (to check your new image)

// list all images
docker images
// list all containers
docker container ls

// remove all docker images
docker system prune -a
// remove a container
docker stop container_id
docker rm container_id
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Docker quick guide

Postby Antonio Linares » Thu Mar 14, 2019 10:35 am

To automatically build a docker image:

1. create a folder named "harbour_docker"

2. inside that folder create a file named "Dockerfile"

Dockerfile
Code: Select all  Expand view  RUN
FROM debian
RUN apt-get update -y
RUN apt-get install mc -y
RUN apt-get install gcc -y
RUN apt-get install git -y
RUN git clone https://www.github.com/harbour/core harbour
RUN /bin/bash


3. docker build harbour_docker -t debian_harbour

4. docker run -it debian_harbour /bin/bash
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Docker quick guide

Postby Antonio Linares » Thu Mar 14, 2019 7:58 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Docker quick guide

Postby Antonio Linares » Fri Mar 15, 2019 9:23 pm

X11: (Termux)

pkg install x11-repo
pkg install libx11-dev

libX11.a is missing and has to be built using this:
https://github.com/termux/x11-packages

to build it we use a docker linux with docker into it:
git clone https://github.com/termux/x11-packages
docker build x11-packages
cd ./x11-packages
./start-builder.sh
./build-package.sh -a ${arch} ${package name}
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Docker quick guide

Postby Antonio Linares » Sun Mar 17, 2019 9:44 am

Docker in Docker:

docker run -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:latest sh -c "apt-get update ; apt-get install docker.io -y ; bash"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Docker quick guide

Postby Antonio Linares » Sun Mar 17, 2019 3:34 pm

docker run -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:latest \
sh -c "apt-get update; \
apt-get install docker.io -y; \
apt-get install mc -y; \
apt-get install git -y; \
git clone https://github.com/termux/x11-packages; \
docker build x11-packages; \
cd ./x11-packages; \
./start-builder.sh; \
bash"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to Utilities / Utilidades

Who is online

Users browsing this forum: No registered users and 4 guests