Docker Cheat sheet, a general cheat sheet for all use case

Docker general Help - docker COMMAND --help This is for each command’s detail For example, docker run --help TL;DR docker run <image> - to initialize a new container docker start <container_name> start running the “stopped” container docker stop <container_name> docker run - Initialize a container Run a command in a new container Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] Basic form to initialize a container, or to run a command...

January 8, 2023 · 9 min · Derry

Git - What Is Origin in Git Push Origin Main

What is origin in git push origin main? The origin is a convention. It’s an alias, short for what we see from the output of git remote -v. You can name it whatever you want. You can think of it as where this code is “originated” from. git remote -v # output origin git@github.com:derrykid/workongit.git (fetch) origin git@github.com:derrykid/workongit.git (push) Set the remote URL as origin and upstream Whenever we pull the code from remote repository, it flows downstream....

November 12, 2022 · 1 min · Derry

Git - How to Switch From Password Prompt to Ssh

GitHub has terminated the login from password in command line. You can switch to SSH. This tutorial will guide you how to do it. Git switch from password to SSH What I do is switch remote URLs from HTTPS to SSH. By doing this, the password prompt is no longer there and I can push directly. Usually we use git clone https://github.com/USERNAME/repo.git to get the clone the remote repo to local machine....

November 12, 2022 · 1 min · Derry

How to Format Flash Drive

How to format USB (flash drive) in Linux command line? Flash drives are very commonly used. From time to time, we stored our files, presentations, logs in this drives. It’s a convenient way to copy and carry around. Sometimes, we’ll like to reformat a flash drive, either to use a different file system or to clean up for friend. In Linux, there are several graphic software that provides you the same ability....

March 17, 2022 · 5 min · Derry