• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

containers

Rebuild Docker containers

December 12, 2021 by Ulysses

How to rebuild your application from scratch using Docker.

#!/bin/bash
docker-compose down -v
docker rmi $(docker images -a -q)
docker-compose up -d
docker-compose restart -t 10

#!/bin/bash docker-compose down -v docker rmi $(docker images -a -q) docker-compose up -d docker-compose restart -t 10

Steps

  • Purge the containers.
  • Delete docker images.
  • Reinitiate docker.
  • Restart docker.

Filed Under: Cloud, Linux Tagged With: application, containers, docker, docker-compose, down, rebuild, remove, restart, up

Stop and remove all Docker containers

December 11, 2021 by Ulysses

How to stop and remove all Docker containers.

Stop all containers

$ docker kill $(docker ps -q)

$ docker kill $(docker ps -q)

Remove all containers

$ docker rm $(docker ps -a -q)

$ docker rm $(docker ps -a -q)

Delete all docker images

$ docker rmi $(docker images -q)

$ docker rmi $(docker images -q)

Filed Under: Linux Tagged With: containers, delete, docker, images, remove, stop

Docker Stop and Remove All

July 4, 2019 by Ulysses

Here’s the command to stop and remove all Docker containers.

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)

Filed Under: Cloud Tagged With: all, containers, docker, remove, stop

VirtualBox 6 in Mint 19

January 16, 2019 by Ulysses

If you like to try out different flavors of Linux as well as other distros, install them in a virtual environment like VirtualBox. In this way you avoid messing up your system since installation will be inside a container. VirtualBox can run in Windows, Mac and Linux. I’m currently running it on Linux Mint 19. If you are curious, the instructions are here to install VirtualBox 6 in Linux Mint 19.

VirtualBox 6.0

Filed Under: Linux Tagged With: 6.0, containers, mint, virtualbox

Snap Packages

July 13, 2018 by Ulysses

Ubuntu 16.04 has a feature called Snap packaging. Snaps are containerized software packages that are simple to create, and easy to install on all major Linux systems. Snap packages are self-contained and separate from your system files. There are no complex dependencies or interference. The packages are safe to run since snap packages and their data are separate from your system files. Updates are automatic and only download what has changed. You can revert to a previous version at any time. Any updates can also be reversed.

To install snap in Ubuntu, run this command from the Terminal.

$ sudo apt install snapd

$ sudo apt install snapd

To install snap packages, run the following:

$ sudo snap install packagename

$ sudo snap install packagename

To get a list of packages installed on your system:

$ snap list

$ snap list

To automatically update the packages, just run the following:

$ sudo snap refresh packagename

$ sudo snap refresh packagename

To revert changes or remove a package, perform the following:

$ sudo snap revert packagename
$ sudo snap remove packagename

$ sudo snap revert packagename $ sudo snap remove packagename

Super easy to use.

Filed Under: Linux Tagged With: containers, snap, ubuntu

  • Home
  • About
  • Archives

Copyright © 2012–2022