This page will be refactored into smaller pages in the near future.


Migrate Github repository to Bitbucket


Docker Delete Images

Make sure no containers are running on the images to be deleted. Delete all containers including its volumes:

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

Delete all images:

docker rmi -f $(docker images -a -q)

Docker Hub

Log in to Docker Hub:

docker login

Link the local image by its tag to the Docker Hub repository. Here I am linking the local image flaskapp to the repository edmondchuc/flask-test.

docker tag flaskapp edmondchuc/flask-test

Push to the repository edmondchuc/flask-test on Docker Hub:

docker push edmondchuc/flask-test

Git Tags


Git has two types of tags, lightweight tags and annotated tags. The main difference is that annotated tags have more metadata than lightweight tags. In general, annotated tags should be used for public releases (which includes metadata like date, name, email, etc) while lightweight tags should be used internally.

Annotated Tags

Create an annotated tag on implicit commits (by default, tag the commit that HEAD is referencing) with a message.

git tag -a <tagname> -m "<message>"

Lightweight Tags

git tag <tagname>

Push tag to repository:

git push origin <tagname>