跳到主要內容

發表文章

最新docker ubuntu linux 安裝法

 # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \   "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \   $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo apt install docker-compose sudo usermod -aG docker ${USER} exit
最近的文章

常用指令

  docker run -it --rm --name python3 _you_like -v "$PWD/app":/usr/src/myapp -w /usr/src/myapp python:3 /bin/bash   docker run -it --rm --name python2_you_like -v "$PWD/app":/usr/src/myapp -w /usr/src/myapp python:2 /bin/bash     請空image 省空間 docker system prune -f docker container prune -f docker rmi $(docker images -a -q)

Mac Big Sur 安裝Netbeans 12

下載JDK 8 安裝  https://www.oracle.com/tw/java/technologies/javase/javase-jdk8-downloads.html 安裝JDK   安裝brew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"    安裝netbeans brew install --cask netbeans 取得JDK 目錄 /usr/libexec/java_home -V  EX: /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home 編輯netbeans config vi /Applications/NetBeans/Apache\ NetBeans\ 12.4.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home" :wq 在執行netbeans    Done

SSH 連線 Amazon EC2 主機

通常我會把下載的pem檔放到.ssh 裡 mv <下載的pem檔> ~/.ssh/ chmod 400 ~/.ssh/<下載的pem檔> ssh -i ~/.ssh/<下載的pem檔> ubuntu@<IP> 當初在選擇 Amazon AMI 時 若選擇 Amazon Linux AMI 使用者名稱則是 ec2-user 若選擇 Ubuntu Server LTS 使用者名稱則是 ubuntu