๐Ÿ“š Computer Science/Git

[GitHub Packages] GitHub Packages

ibelieveinme 2023. 10. 18. 16:20
728x90

 

GitHub Packages documentation - GitHub Docs

Learn to safely publish and consume packages, store your packages alongside your code, and share your packages privately with your team or publicly with the open source community. You can also automate your packages with GitHub Actions.

docs.github.com


*GitHub Packages

๋ณ„๋„์˜ ์„ค์น˜๋‚˜ ์…‹ํŒ… ์—†์ด *npm, *Apache maven, *rubygems, *Gradle, *NuGet ํŒจํ‚ค์ง€ ๋ฐ Docker Image๋ฅผ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค.

Public ์œผ๋กœ ๊ณต๊ฐœํ•  ์ˆ˜๋„ ์žˆ๊ณ  Organization ๊ตฌ์„ฑ์›๋“ค์—๊ฒŒ๋งŒ ์ œํ•œ์ ์œผ๋กœ ๊ณต๊ฐœํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

์›นํ›…๊ณผ GitHub Actions ์™€ ์—ฐ๋™ํ•˜์—ฌ ์ž๋™ํ™”๋œ CI/CD ํ”„๋กœ์„ธ์Šค๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

 

์ฐธ๊ณ ) GitHub ์—์„œ GitHub Packages ๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ Docker Image ๋ฅผ ์ง€์›ํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ, Github Container Registry ๊ฐ€ ๋ฐœํ‘œ๋˜๋ฉฐ Docker Image -> Container Registry ๋กœ ๋Œ€์ฒด๋˜์—ˆ๋‹ค. ํ•˜์ง€๋งŒ ์•„์ง ๋‘˜๋‹ค ์ง€์›ํ•˜๋Š” ์ƒํƒœ์ด๋‹ค.

 

*NuGet: .NET ํ”Œ๋žซํผ์šฉ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ. Visual Studio์—์„œ Open Source, Library ๋“ฑ์„ ๋‹ค์šด๋กœ๋“œ ํ•˜๊ณ  ์„ค์ • ์ปดํŒŒ์ผ ํ•˜๋Š” ์ผ๋ จ์˜ ๊ณผ์ •์„ GUI ํ™˜๊ฒฝ์—์„œ ๋‹ค์šด ๋ฐ›์•„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž.

*npm: ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์–ธ์–ด๋ฅผ ์œ„ํ•œ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž

*maven: java ํ”„๋กœ์ ํŠธ๋“ค์„ ์œ„ํ•œ ๋นŒ๋“œ ์ž๋™ํ™” ๋„๊ตฌ

* rubygem: ruby ๋ฅผ ์œ„ํ•œ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž

*Gradle: Groovy ๋ฅผ ์ด์šฉํ•œ ๋นŒ๋“œ ์ž๋™ํ™” ์‹œ์Šคํ…œ. Android Studio ์˜ ๊ณต์‹ ๋นŒ๋“œ ์‹œ์Šคํ…œ.

 

 

* Docker Image

Docker ์—์„œ ์„œ๋น„์Šค ์šด์˜์— ํ•„์š”ํ•œ ์„œ๋ฒ„ ํ”„๋กœ๊ทธ๋žจ, ์†Œ์Šค์ฝ”๋“œ ๋ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ, ์ปดํŒŒ์ผ๋œ ์‹คํ–‰ ํŒŒ์ผ์„ ๋ฌถ๋Š” ํ˜•ํƒœ.

์ฆ‰, ํŠน์ • ํ”„๋กœ์„ธ์Šค๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ(์ปจํ…Œ์ด๋„ˆ ์ƒ์„ฑ(์‹คํ–‰์— ํ•„์š”ํ•œ) ๋ชจ๋“  ํŒŒ์ผ๊ณผ ์„ค์ •๊ฐ’์„ ์ง€๋‹Œ ๊ฒƒ์œผ๋กœ ๋” ์ด์ƒ์˜ ์˜์กด์„ฑ ํŒŒ์ผ์„ ์ปดํŒŒ์ผํ•˜๊ฑฐ๋‚˜ ์ด๊ฒƒ์ €๊ฒƒ ์„ค์น˜ํ•  ํ•„์š”๊ฐ€ ์—†๋Š” ์ƒํƒœ์˜ ํŒŒ์ผ.

 

ex) Ubuntu Image๋Š” Ubuntu ๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ๋ชจ๋“  ํŒŒ์ผ์„ ๊ฐ–๊ณ  ์žˆ๊ณ , Oracle Image ๋Š” Oracle ์„ ์‹คํ–‰ํ•˜๋Š”๋ฐ ํ•„์š”ํ•œ ๋ชจ๋“  ํŒŒ์ผ๊ณผ ์ •๋ณด๋ฅผ ๊ฐ–๊ณ  ์žˆ๋‹ค.

 

 

* Image ์™€ Layer

Layer ๋ž€ ๊ธฐ์กด ์ด๋ฏธ์ง€์— ์ถ”๊ฐ€์ ์ธ ํŒŒ์ผ์ด ํ•„์š”ํ•  ๋•Œ ๋‹ค์‹œ ๋‹ค์šด๋กœ๋“œ๋ฐ›๋Š” ๋ฐฉ๋ฒ•์ด ์•„๋‹Œ ํ•ด๋‹น ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•œ ๊ฐœ๋….

Image ๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ฝ๊ธฐ ์ „์šฉ(read only) Layer ๋กœ ๊ตฌ์„ฑ๋˜๊ณ , ํŒŒ์ผ์ด ์ถ”๊ฐ€๋˜๋ฉด ์ƒˆ๋กœ์šด Layer ๊ฐ€ ์ƒ์„ฑ๋œ๋‹ค.

Docker ๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ Layer ๋ฅผ ๋ฌถ์–ด์„œ ํ•˜๋‚˜์˜ ํŒŒ์ผ ์‹œ์Šคํ…œ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค.

Image ์™€ Layer ๋Š” ๊ฐ™์€ ์˜๋ฏธ๋กœ ์‚ฌ์šฉ๋œ๋‹ค.

 

 

* Docker Container

Image ๋ฅผ ์‹คํ–‰ํ•œ ์ƒํƒœ. ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์˜ ์ข…์†์„ฑ๊ณผ ํ•จ๊ป˜ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ์ž์ฒด๋ฅผ ํŒจํ‚ค์ง• or ์บก์Šํ™”ํ•˜์—ฌ ๊ฒฉ๋ฆฌ๋œ ๊ณต๊ฐ„์—์„œ ํ”„๋กœ์„ธ์Šค๋ฅผ ๋™์ž‘์‹œํ‚ค๋Š” ๊ธฐ์ˆ .

 

 

* Container Registry

Container Images ๋ฅผ ์ €์žฅํ•˜๊ณ  ์ ‘๊ทผํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ์˜ ์ง‘ํ•ฉ.

728x90