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

Curl cheat sheet, for web developement

HTTP Request Specify Method by -X Form: curl -X <METHOD> <URI> By default, it uses GET method curl https://www.google.com/ # same as curl -X GET https://www.google.com/ Use Post simply by: curl -X POST https://www.example.com/ GET Get entire document of the website in terminal curl https://www.google.com/ POST curl -X POST https://example.com/ More complex, pass data, -d and header -H to server. Below shows POST with json body curl -d '{"option": "value", "something": "anothervalue"}' \ -H "Content-Type: application/json" \ -X POST https://example....

December 18, 2022 · 1 min · Derry