Skip to content

python3.12 devcontainer template repository

Notifications You must be signed in to change notification settings

AI-Data-System-EH/python-devcontainer-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devcontainer로 개발환경 사용하기

  • 필요한 모든 종속성이 포함된 개발 환경을 빠르게 설정
  • 일관되고 재현 가능한 개발 환경 공유
  • 로컬 환경과 격리된 컨테이너로 종속성 충돌 및 불필요한 설치 방지

템플릿 리포지토리 사용방법

자세한 설명은 "템플릿에서 리포지토리 만들기" 링크를 참조하세요.

Web에서 리포지토리 생성

오른쪽 위 Use this template 버튼을 눌러 새 리포지토리를 생성하세요.

GitHub CLI로 내 GitHub 프로필에 새 리포지토리 생성

your-project-name을 새로 생성할 리포지토리 이름으로 변경하세요.

gh repo create --template https://github.com/AI-Data-System-EH/python-devcontainer-template --public your-repository-name

Git으로 로컬에 리포지토리 클론

your-repository-name을 새로 생성할 리포지토리 이름으로 변경하세요.

git clone https://github.com/AI-Data-System-EH/python-devcontainer-template your-repository-name

복제한 리포지토리 폴더에서 기존 .git 폴더를 제거하고, 새로 git을 초기화하세요.

⚠️ git을 초기화하지 않으면, 지금 복제한 이 템플릿 리포지토리에 커밋하게 됩니다. 주의하세요!

cd <your-repository-name>
rm -rf .git
git init && git branch -M main

Visual Studio Code에서 Devcontainer 프로젝트 열기

  1. Docker Desktop(또는 Docker CLI)를 설치합니다.
  2. Visual Studio Code을 설치합니다.
  3. Visual Studio Code에 Remote - Containers 확장을 설치합니다.
  4. Visual Studio Code에서 파일 > 폴더 열기...를 선택하여 프로젝트를 엽니다.
  5. Visual Studio Code에서 F1을 눌러 개발 컨테이너: 컨테이너에서 폴더 열기 (Dev Containers: Open Folder in Container)를 선택합니다.

    ⚠️ 프로젝트 폴더에 .devcontainer/devcontainer.json 파일이 있어야 vscode에서 devcontainer를 사용할 수 있습니다.

  6. 개발 컨테이너가 준비되면 프로젝트를 사용할 수 있습니다.