Introduction of Docker --Part 1--

background

――I'm developing in a Docker environment at my company, but I'm not sure, so I decided to create the environment myself.

things to do

--Creating a repository on github --Synchronization of the created repository with the local environment --Synchronization of github and docker

Things necessary

--github account --dockerhub account

1. Create repository on github

--Create a repository from the "+" button on the top right of github. Anyone can do this as it is normally written.

2. Synchronize the created repository with the local environment

--Copy the URL displayed after creating the repository --Creating a directory to synchronize locally

init


# ~/Create a directory under Documents (create location and directory name are arbitrary)
mkdir ~/Documents/Sample
#Go to the directory you created and clone
cd ~/Documents/Sample
git clone [URL]
#This~/Documents/A directory is created with the repository name created under Sample

However, it is different if you want to upload a file to the extent that it appears locally.

# ~/Create a directory under Documents (create location and directory name are arbitrary)
mkdir ~/Documents/Sample
#Move to the created directory and initialize
cd ~/documents/Sample
git init
#Create a file and commit various things
touch sample.txt
git add -A
git commit -m "first commit"
#Get local information
git remote add origin [URL]
#Finally push
git push origin master
  1. Sync between github and docker --First of all, cooperation with github

--After logging in to Dockerhub, click on the fingerprint mark on the upper right and select "Account Setting". --After that, select Linked Accounts, and then link along the flow.

--Creating a repository on docker hub

--Select Repositories from the menu bar, then select Create Account --After entering the Name and Description, click the github mark below to select which repository to link with.

For the time being, cooperation is complete.

Recommended Posts

Introduction of Docker --Part 1--
[Docker] Introduction of basic Docker Instruction
Introduction to Linux Container / Docker (Part 1)
Introduction to Linux Container / Docker (Part 2)
Introduction of pay.jp
Introduction of milkode
Rails Docker ~ Part 1 ~
Rails Docker ~ Part 2 ~
Introduction of Docker Hub and commands Self-learning ①
Install Docker with WSL2 Memo ([Part 2] Docker introduction)
[Docker] Introduction to docker compose Basic summary of docker-compose.yml
[Rails] Introduction of PAY.JP
study of dbpedia part 25
Introduction of user authentication
Docker monitoring-explaining the basics of basics-
About simple operation of Docker
Understand the basics of docker
I've only heard of Docker ...
Form part attributes of form_with
Fastest Docker introduction (Windows 10 edition)
Introduction to Spring Boot Part 1
Introduction of javaFX in Eclipse (April 2020)
[Rails] Introduction of Rubocop by beginners
[Docker Network Chapter 2] Explanation of Docker Networking
[Docker Network Chapter 1] Explanation of Docker Networking
Basic usage of java Optional Part 1
Summary of frequently used Docker commands
From introduction to use of ActiveHash
[Java] Appropriate introduction by the people of Tempa Java Part 0 (Code rules)
From introduction to usage of byebug
Server processing with Java (Introduction part.1)
Docker [Batch deletion of <none> tags]
Summary about the introduction of Device
Introduction to Docker (1) Frequently used commands
docker
[Summary of technical books] Summary of reading "Introduction to Docker / Kubernetes Practical Container Development"
[Docker] Introduction of basic options (sharing, user, port, CPU / memory) during Docker run
[Ruby on Rails] Introduction of initial data
Put Kanban in Docker of Raspberry Pi 3
Introduction memo of automatic test using Jenkins
Introduction to swift practice output Chapter 5 Part 2
The story of updating SonarQube's Docker Container
Summary of Docker understanding by beginners ② ~ docker-compose ~
part of the syntax of ruby ​​on rails
[In-house study session] Introduction of "Readable Code"
[Challenge Docker from 0] Overview and terms of Docker
Extract a part of a string with Ruby
Personal application production 2 Introduction of WEB fonts
Introduction of New Generation Java Programming Guide (Java 10)
Output of the book "Introduction to Java"
Introduction to Docker / Kubernetes Practical Container Development
Introduction and precautions of gem Friendly Id
Introduction of IDOM engineer's development environment (physics)
Introduction and usage explanation of Font Awesome
Japanese setting of mysql in Docker container
Introduction of New Generation Java Programming Guide (Java 11)
[Vue.js] Implementation of menu function Vue.js introduction rails6
Introduction of New Generation Java Programming Guide (Java 12)
[Introduction to Docker] Official Tutorial (Japanese translation)