sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker pull debian
docker commit [container ID] [new image name]
E.g.
docker commit busy_wiles nadimdg/xmrig:auto4
docker ps
docker ps -a
docker rm <container-name>
docker images
docker rmi <image-name>
docker exec -it xmrig-dev /bin/sh
This starts the container and detaches the process from it.
docker run -di --name flast101 alpine:latest
Where:
-d: detach
-i: interactive
docker stop <image-name>
First create a docker file. An example is shown below, let’s call it p2pooldev.Dockerfile.
FROM p2pool:built
WORKDIR /opt/p2pool
CMD ["/opt/p2pool/p2pool"]
FROM keyword indicates which docker image the container is built from.WORKDIR keyword sets the current working directory for the CMD.CMD keyword holds the command to be executed.Note that if the CMD requires arguments, then in the Dockerfile you must split the command and it’s arguements as shown below:
CMD ["/bin/ls", "-l", "-t", "-r"]
docker build -f p2pooldev.Dockerfile -t sallykolodny/db4e:p2pooldev .
Where:
-f specifies a Dockerfile (i.e. p2pooldev.Dockerfile)-t specifies the way to save the imageThe odd name is to align with a Dockerhub account where the account name is sallykolodny, the repository is called db4e and the version of the image is p2pooldev. By using such a name you can easily upload the image to Dockerhub after authenticating. Create a container and start it up.
docker push nadimdg/xmrig:autostart