Page 1 of 1

Docker quick guide

Posted: Thu Mar 14, 2019 10:05 am
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

Re: Docker quick guide

Posted: Thu Mar 14, 2019 10:35 am
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

Re: Docker quick guide

Posted: Thu Mar 14, 2019 7:58 pm
by Antonio Linares

Re: Docker quick guide

Posted: Fri Mar 15, 2019 9:23 pm
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}

Re: Docker quick guide

Posted: Sun Mar 17, 2019 9:44 am
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"

Re: Docker quick guide

Posted: Sun Mar 17, 2019 3:34 pm
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"