GeekCoding101

  • Home
  • GenAI
    • Daily AI Insights
    • Machine Learning
    • Transformer
    • Azure AI
  • DevOps
    • Kubernetes
    • Terraform
  • Technology
    • Cybersecurity
    • System Design
    • Coding Notes
  • About
  • Contact
notes
Coding Notes

Docker Notes

Hi there! This is yet another note from me ^^ This is for my notes about Docker. I've been dealing with container technologies for years, it's a good habit to dump all of my notes here. I hope you find this useful as well. Build Docker Image Method 1: Docker build Using dockerfile is the formal way to build a docker image. We can define the base image to pull from, copy files inside it, run configuration, specify what process to start with. You know I like using Django for projects, here comes a dockerfile from Cookiecutter: Method 2: Docker commit Another way is to use docker commit <container_id> <new_image_name>, it will create a new image based on your existing image in you docker local storage. Export/Import After we have docker images, we usually want to share it with other or transfer to another places, that's where export/import are used: Docker Registry Environment: CentOS 7.2 Setup Docker repository Install and enable docker-registry Verify docker-registry service Configure storage_path Update local storage path to your specific location in /etc/docker-registry.yml: Then restart: systemctl restart docker-registry.service Setup client to use the registry Update /etc/sysconfig/docker to add --insecure-registry your_ip_or_hostname:5000 as below: Push to the registry In order to have some images to push to the registry, let's pull from docker.io firstly: docker pull centos Please write down the IMAGE ID for the centos image If you push it to your own registry now, you will get error as blow: So you need to create a repo on your private registry then try to push again. To do that, you can tag a repo on your private…

March 8, 2018 0comments 706hotness 0likes Geekcoding101 Read all
Coding Notes

Git Notes

Hi there! Recently, I've spent some time to organize my git commands notes. I know you can find those commands online easily, but I would like to share these what I think useful and put them together here for my own references. Let's take a look! General Settings You will notice that, for each commit, it has both author name and committer name. Branches Operations Command Get current working branch git branch Checkout specific branch git clone -b specific_branch --single-branch http://username@192.168.99.100:8080/scm/your-repo.git Create a branch git checkout -b new_branch Push to remote branch git push origin remote_branch Delete local branch git branch -d <branch> Delete remote branch git push origin :[name_of_your_new_branch] Fast-forward merge Git Clone Clone into current directory Git Checkout Check out files deleted locally Sometimes, you might accidently delete some files in your local repos. Then you can use below command to pull them back from remote: Clone a subdirectory only of a Git repository What you are trying to do is called a sparse checkout. This creates an empty repository with your remote, and fetches all objects but doesn't check them out. Then do: Now you need to define which files/folders you want to actually check out. This is done by listing them in .git/info/sparse-checkout, eg: Last but not least, update your empty repo with the state from the remote: You will now have files "checked out" for "temp" folder on your file system, and no other paths present. Clone specific branch of a Git repository Just use singel-branch option: Git Remote I was wondering what is a git remote, here is:…

January 6, 2018 0comments 476hotness 0likes Geekcoding101 Read all
123
Newest Hotest Random
Newest Hotest Random
A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way Golang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It) Terraform Associate Exam: A Powerful Guide about How to Prepare It Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2 ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5
Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure CodeTerraform Associate Exam: A Powerful Guide about How to Prepare ItGolang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It)A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way
Install Azure-Cli on Mac A Tutorial of Angular, Karma and Jasmine Weight Initialization: Unleashing AI Performance Excellence Mastering Openssl Command and NSS Database Management Terraform Associate Exam: A Powerful Guide about How to Prepare It Groundbreaking News: OpenAI Unveils o3 and o3 Mini with Stunning ARC-AGI Performance
Newest comment
Tag aggregation
AI cybersecurity Transformer Supervised Machine Learning security Machine Learning Daily.AI.Insight notes

COPYRIGHT © 2024 GeekCoding101. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang