MacOS에서 경량 알파인 VM을 생성하고 관리합니다.
? 원활한 포트 전달
자동 파일 공유
? 다리 네트워킹
Aarch64 및 X86_64 에뮬레이션

이 프로젝트의 목표는 MacOS 사용자가 다음을 수행 할 수 있도록하는 것입니다.
macpine 현대 MacOS에서 사용하기위한 것입니다. 이전 버전의 MACOS 및 기타 OS에 대한 지원은 다를 수 있습니다.
brew install macpine # installs `alpine` command and `qemu` dependency automatically 시스템의 최신 바이너리 릴리스를 다운로드하여 EG /usr/local/bin/ 로 이동하여 $PATH 에 추가하십시오.
arch= " $( [ ` uname -m ` = ' x86_64 ' ] && echo ' amd64 ' || echo ' arm64 ' ) " # detect architecture
wget " https://github.com/beringresearch/macpine/releases/latest/download/alpine_darwin_ $arch "
mv " alpine_darwin_ $arch " alpine
sudo chmod +x alpine
sudo mv alpine /usr/local/bin/
# export PATH="$PATH:/usr/local/bin"macpine은 qemu> = 7.22.0에 의존합니다.
brew install qemu MacPorts를 통해 macpine 설치할 수도 있습니다.
sudo port install macpine 소스에서 건물을 건축하려면 작동중인 go 컴파일러가 필요하며 달리기에는 qemu 필요합니다.
brew install go qemu
git clone https://github.com/beringresearch/macpine
cd macpine
make # compiles the project into a local bin/ directory
make install # installs binaries to /usr/local/bin
# PREFIX=/some/other/path make install installs to /some/other/path새 인스턴스를 작성하고 시작하려면 :
alpine launch # launches with default parameters
alpine launch -a aarch64 # create an aarch64 instance
alpine launch -d 10G -c 4 -m 2048 # create an instance with a 10GB disk, 4 cpus, and 2GB of RAM
alpine launch -h # view all configuration options and defaultsSSH를 통한 인스턴스 액세스 :
alpine launch -s 22 # launch an instance and expose SSH port to host port 22
alpine ssh instance-name # attach shell to instance (replace `instance-name` as appropriate)추가 인스턴스 포트를 호스트에 노출시킵니다.
# launch an instance, expose SSH to host port 2022 and forward host ports 8888 and 5432 to instance ports 8888 and 5432
alpine launch -s 2022 -p 8888,5432
# launch an instance, expose SSH to host port 8022, forward host port 8081 to instance port 8082, and forward
# host port 8083 to instance port 8083
alpine launch -s 8022 -p 8081:8082,8083
# launch an instance, expose SSH to host port 9022, forward host port 9091 UDP to instance port 9091 UDP,
# and forward host port 9092 UDP to instance port 9093 UDP
alpine launch -s 9023 -p 9091u,9092:9093u .tar.gz 파일로 백업 또는 공유를 위해 인스턴스를 쉽게 포장 할 수 있습니다.
alpine list
NAME STATUS SSH PORTS ARCH PID TAGS
cheerful-result Running 2022 aarch64 26568
glittering-swing Running 3022 x86_64 57206 emulation,intelalpine publish cheerful-result 이렇게하면 cheerful-result.tar.gz 파일이 생성됩니다.
# alpine delete cheerful-result
alpine import cheerful-result.tar.gz자세한 내용은 모든 문서를 참조하십시오.
Create, control, and connect to Alpine instances.
Usage:
alpine [command]
Available Commands:
completion Generate shell autocompletions.
delete Delete instances.
edit Edit instance configurations.
exec execute a command on an instance over ssh.
help Help about any command
import Imports an instance archived with `alpine publish`.
info Display information about instances.
launch Create and start an instance.
list List instances.
pause Pause instances.
publish Publish instances.
rename Rename an instance.
restart Stop and start instances.
resume Unpause instances.
ssh Attach an interactive shell to an instance via ssh.
start Start instances.
stop Stop instances.
tag Add or remove tags from an instance.
Flags:
-h, --help help for alpine
Use "alpine [command] --help" for more information about a command. 명령의 여러 인스턴스 : 일부 명령 ( delete , edit , info , pause , publish , restart , resume , start , stop ) 여러 인스턴스 이름을 수락하고 각 고유 한 인스턴스를 한 번에 반복합니다.
태그 : alpine tag 사용하면 인스턴스가 태그를 지정할 수 있습니다. 태그는 다중 인스턴스 명령 (위 참조)에서 사용할 수 있습니다. 예를 들어 alpine start +foobar alpine tag instance-name foobar 와 함께 foobar 로 표시된 모든 인스턴스를 시작합니다. TAG launchctl-autostart 는 로그인시 자동 시작 인스턴스에 사용됩니다.
Shell Autocompletion : 쉘 명령 완료 파일 ( brew install macpine 으로 자동으로 설치)은 alpine completion [bash|zsh|fish|powershell] 으로 생성 할 수 있습니다. 자세한 내용은 alpine completion -h 또는 완료 문서를 참조하십시오.