git-commands

git rebase -i HEAD~N 复制提交记录 git branch -f target-branch-name commit-id 切换到 target-branch-name 并指向 commit-id git cherry-pick commit-id1 commit-id2 重新排序提交的记录. cherry-pick 名字起得真是有意思啊. 像捡樱桃似的, 把一个个想要的记录捡到当前分

csapp-memory-hierarchy

storage Disk Controller 我们知道定位一个磁盘空间需要三个参数(platter, track, sector). 但是 cpu 不使用这么麻烦的方式, cpu 使用的是逻辑盘号. 也就是磁盘控制器将逻辑盘号翻

building-docker-image

Docker images are built based on a Dockerfile. A Dockerfile defines all the steps required to create a Docker image with your application configured and ready to be run as a container. The image itself contains everything, from operating system to dependencies and configuration required to run your application. Having everything within the image allows you to migrate images between different environments and be confident that if it works in one environment, then it will work in another.

deploy-static-website

Create a Dockerfile Docker Images start from a base image. The base image should include the platform dependencies required by your application, for example, having the JVM or CLR installed. This base image is defined as an instruction in the Dockerfile. Docker Images are built based on the contents of a Dockerfile. The Dockerfile is a list of instructions describing how to deploy your application. # base image FROM nginx:alpine # copies the content of the current directory into a particular location (/usr/share/nginx/html)inside the container.

katacoda-deploying-first-docker-container

Running a container background(detached) docker search image-name docker search redis docker run options image-name:version solution1: default latest version docker run -d redis solution2: version is 3.2 docker run -d redis:3.2 Find running container docker ps docker inspect <container-id> docker logs <container-id> Access redis note: each docker container is sandboxed solution1: specify host port is 6379 -p host-port:container-post docker run -d --name redisHostPort -p 6379:6379 redis:latest solution2: specify randomly host port -p container-port