ǰλ: ҳ > Linuxװ̳ > װ >

ѧϰdocker on windows (1): ΪʲôҪʹdocker

ʱ:2018-02-27 03:00Դ: :Linux ٱ :
ʹijpc, ôڻϲҲװ̴ͼ: ôмҪŪ: App Store Linuxİ ijЩ

Ѿwww27111com www.pt2588.com ʹijpc, ôڻϲҲװ̴ͼ:

ôмҪŪ:

App Store

Linuxİ

ijЩվֱ

ǷṩϢ

ж, ش, ڵbug, ϴεĸʱȵ.

վǷΪٷվ

http https

Ƿ񻹿

Ƿշ

һŵ: װ

Ƿ֧ҵIJϵͳ/汾

Ƿ֧ҵ豸CPUܹ

ĸʽ

ЩǴԴаװ

Щǵexeļ

еexe+dlls

ʱexe+dlls+ijЩʱ

İװʽ

Դİװ

ʹð߰װ

ֶװ

ĸºж

Զ?

(˵Ǹج)

ЩԿ, , װǸͦ鷳, ڿص, ʱͷ.

ڶ:

ܻⷽ:

Ƿϸİĵ

ǷҪֶ޸ϵͳijЩ

ǷҪûPATH

οʼ, ν

ǷҪע

ע

ǷҪֶд

ǷҪ

ΰװ

ûҵô

ѭ

ȫ, ɳ?

ƻԸ

ϵͳǷƻӰ

Ŀи

ʲô

Docker, docker⻯, ǹ.

ʲô,ʲô?

Ƚһ:

ѧϰdocker on windows (1): ΪʲôҪʹdocker

ѷӲԴ(CPU,ڴ,Ӳ,)иɶİ汾, ȻЩӲϵͳ.

ϵͳϵͳһ.

ͬ, DockerиDzϵͳԴ, ̵ռ, ջ, 洢ջȵ:

ѧϰdocker on windows (1): ΪʲôҪʹdocker

ÿPIDΪ1Ľ, ÿҲԼĸļϵͳ(windowsC, linux/).

dockerԳǶԲϵͳ⻯, dz.

ԾһЩ, װ sql server, mysql, mongodb, postgresql , , װ, . еĻͦ鷳.

濴ʹdockerô, Ҫװdocker.

װDocker

Docker for windows صַ: https://store.docker.com/editions/community/docker-ce-desktop-windows

װdocker, ϵͳ½̴dockerͼ, ȵͼ겻˸, ˵dockerѾɹ.

ҼͼSettings.

ͨпһdocker״̬:

docker version

ѧϰdocker on windows (1): ΪʲôҪʹdocker

Կclientwindows, serverlinux(ϵͳҪHyper-V).

Hyper-VԿlinux:

ѧϰdocker on windows (1): ΪʲôҪʹdocker

ʹDocker: Postgresql

ȥ https://hub.docker.com/ Ҫʹõ, postgresql : https://hub.docker.com/_/postgres/

ҳԿ postgresdockerٷϿɵĿ. ҳ·ʹ˵.

ȱdocker.

Ȼdocker hubpostgres(Ӧýimage), ִ:

docker pull postgres

صĹʱȽ, ڹ (ٶʵ̫, ôʹðƵ: https://dev.aliyun.com/search.html?spm=5176.1972343.0.1.340c5aaafU9rRJ):

һʱ֮, :

imageѾ, ôҪͨijַʽimage, 漰container.

һѾװõ, imageòװ, ȻͿװõpostgresql.

ͨװ֮еexe, е, postgresql.

ͨװ:

docker run

docker run һִ.

ע: еdockerdockerͷ, Ҳǵdocker. docker run xxxʾdockerijimage. Ȼͻ˾ͻͨAPIø߷(Daemonػ, ʵDocker Remote Api߽Docker Engine Api). Daemonȿûimage, Ȼûҵimage, Ȼdaemonͻdocker hub ȡimage, Ȼʹimageµcontainer.

ִdocker run postgres:

ԿpostgresqlѾ. ݺ͵װpostgresqlһ.

ʹ docker ps 鿴е:

Ȼչٷĵʹpsqlȥpostgresql:

Կ, 뵽psql. postgresʹͳʽװpostgresqlһ.

дpostgresql:

docker exec ڵ:

ҵеdockerlinux, Կʹһlinuxbash:

ѧϰdocker on windows (1): ΪʲôҪʹdocker

ʹdocker ps鿴е, Ȼʹdocker exec -it 08 bashִIDΪ08ͷڵbash. -itʾģʽ.

Ȼʹps -e鿴ڵlinuxĽ, bash, ղеpsql, ps.

˳

ڽģʽʹexit˳:

ֹͣҪʹdocker stop ID:

Щʹdockerԭ.......

Ƽ