containerization

(★ 8,892)

Containerization은 macOS에서 Linux 컨테이너를 실행하기 위한 Swift 패키지입니다.

파일 탐색기

  • .gitignore
  • .spi.yml
  • .swift-format
  • .swift-format-nolint
  • .swift-version
  • CLAUDE.md
  • CONTRIBUTING.md
  • LICENSE
  • licenserc.toml
  • MAINTAINERS.txt
  • Makefile
  • Package.resolved
  • Package.swift
  • Protobuf.Makefile
  • README.md
  • SECURITY.md

# 설치 가이드

swift
사전 준비물

설치 및 실행 절차

sudo xcode-select -s <PATH_TO_XCODE>

Xcode 개발자 디렉터리를 활성 상태로 설정합니다.

container --version

Apple container CLI가 올바르게 설치되었는지 확인합니다.

make fetch-default-kernel

테스트를 위한 기본 리눅스 커널을 다운로드합니다.

make all

Containerization 패키지를 소스에서 빌드합니다.

make test integration

기본 및 통합 테스트를 실행합니다.

핵심 명령어

make all

프로젝트의 모든 소스를 빌드합니다.

make test

단위 테스트를 실행합니다.

make integration

통합 테스트를 실행합니다.

make fetch-default-kernel

기본 가상머신 커널을 가져옵니다.

make protos

Protobuf 파일로부터 gRPC 인터페이스 코드를 재생성합니다.

make docs

API 문서를 생성합니다.

make serve-docs

생성된 문서를 로컬에서 미리보기로 서빙합니다.

make pre-commit

코드 포맷 및 라이선스 헤더 검사를 위한 pre-commit 훅을 설치합니다.

macOS Apple Silicon 및 최신 macOS/Xcode 버전 환경이 필수적입니다.

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

git commit

설명 보기 ▼

Commit files to the repository.

git commit

Open an editor to write a message and commit staged files to the repository:

git commit {{[-m|--message]}} "{{message}}"

Commit staged files to the repository with the specified message:

git commit {{[-F|--file]}} {{path/to/commit_message_file}}

Commit staged files with a message read from a file:

🔍

container

설명 보기 ▼

Create and run Linux containers as lightweight virtual machines on macOS.

container system start

Start the container services (required before running containers):

container run --rm {{[-it|--interactive --tty]}} {{image}} {{sh}}

Run a container from an image interactively and remove it after it exits:

container run {{[-d|--detach]}} --name {{container_name}} {{[-p|--publish]}} {{8080:80}} {{image}}

Run a container in the background with a name and a published port:

🔍

xcode-select

설명 보기 ▼

Xcode의 다양한 버전과 포함된 개발자 도구 간에 전환.
설치 후 Xcode가 이동된 경우 경로를 업데이트하는 데 사용됩니다.
더 많은 정보: <https://developer.apple.com/library/archive/technotes/tn2339/_index.html>.

xcode-select --install

Xcode의 명령줄 도구 설치:

xcode-select --switch {{path/to/Xcode.app/Contents/Developer}}

주어진 경로를 활성 개발자 디렉토리로 선택:

xcode-select --switch {{path/to/Xcode_file.app}}

주어진 Xcode 인스턴스를 선택하고 해당 개발자 디렉토리를 활성 디렉토리로 사용:

// repository documentation