2

I am really new at this Docker stuff, and even newer at Docker Hub, so please bear with me …</p>

I have created a data container to use with my docker image (specifically, a data container to store data for a running mssql-server-lnux image). I know where it is on my local system.

I have a newly created account on Docker Hub and I think I want to push the data container on the hub. I say I think because I’m not sure that it’s the right way to go about it: I want to be able to use the data container from different machines.

If what I have said so far is in the right direction, then how do I push the docker image to the Hub, and how do I then access it later?

4

3 に答える 3

2

コンテナーをプッシュすることはできず、イメージのみをプッシュできます。この区別は重要です。

画像はコンテナのクラスに似ており、コンテナは基本的に画像のインスタンスです。

したがって、データベースを共有するためにプッシュしたい場合、それは良い考えではありませんdocker commit.最初にあなたがしなければならないでしょう.

しかし、新しいデータ コンテナーを使用して別のマシンで mysql の新しいインスタンスを開始したい場合 (最初はデータがありません)、先に進んでデータ コンテナー イメージをプッシュします。

お役に立てれば。

于 2017-03-20T09:47:07.847 に答える