Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
tpokorraPublic archive

About

useful scripts for docker containers. Repo has been moved to https://codeberg.org/tpokorra/docker-scripts

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

This repository contains some useful scripts and Dockerfiles to create Docker containers.

My need is for containers where I can do builds inside, and connect via SSH from the outside.

Please setup a public/private key pair which will be used to login to the containers via SSH:

ssh-keygen -t rsa -C "yourname@example.org"

Some useful commands:

Installation on Fedora:

yum install docker
sudo systemctl start docker
sudo systemctl enable docker

Initialize and start a container:

./initDockerContainer.sh 50-centos7-mymachine 50 Dockerfiles/Dockerfile.centos7

Show some information:

# show all running containers
docker ps
# show all existing containers
docker ps -a
# show the docker images
docker images
# show overall docker info
docker info

Attach Bash Shell to container:

docker exec -t -i test9 /bin/bash

Stop and delete a single container:

docker stop test9
docker rm test9

Delete a docker image:

docker rmi myimage

Total clean up:

# stop all containers
docker stop $(docker ps -q)
# delete all containers
docker rm $(docker ps -aq)
# delete all images
docker rmi $(docker images -q)

About

useful scripts for docker containers. Repo has been moved to https://codeberg.org/tpokorra/docker-scripts

Resources

Stars

4 stars

Watchers

1 watching

Forks

Contributors

Languages