Docker quick guide

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Docker quick guide

Post by Antonio Linares »

// 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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Docker quick guide

Post by Antonio Linares »

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

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Docker quick guide

Post by Antonio Linares »

regards, saludos

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

Re: Docker quick guide

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Docker quick guide

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Docker quick guide

Post by Antonio Linares »

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
Post Reply