2017-10-05 3 views
0

내가 dockerhub 내 microservice을 밀어 싶어하지만 난 그것을 허브를 고정 표시기 밀어하는 방법을 잘 모릅니다, docker login 후 허브를 고정 표시기 이미지를 추진하는 방법은이 메시지이미지를 생성하고 다음 다음 <code>using docker push</code> 메신저

The push refers to a repository [docker.io/library/microservicehelloworld] 
An image does not exist locally with the tag: microservicehelloworld 
이동

하고

docker tag microservicehelloworld microservicehelloworld 

메신저를 사용하고이

Error response from daemon: No such image: microservicehelloworld:latest 
같은 에러 메시지를 도시

여기 내 모든 해결책이 있습니다. 누락 된 파일이 있습니까? 아니면 부두 이미지를 만들기 위해해야 ​​할 일이 있습니까? 당신이 Dockerfile이 같은 빌드를 수행 할 필요가있어 디렉토리 내부 enter image description here

답변

0

:

docker build -t microservicehelloworld . 

다음 태그는 다음과 같다 :

docker tag microservicehelloworld docker.io/library/microservicehelloworld 

그리고 마지막으로 당신 것 그것을 밀 수있다 :

docker push docker.io/library/microservicehelloworld 
1

1 단계 : Ple ase는 hub.docker.com에 귀하의 계정을 만드십시오. , 귀하의 사용자 이름.

2 단계 : 내 이미지 이름이 mysql_mac

3 단계이다 이러한 경우에, 당신의 Dockerfile $ docker build -t="mysql_mac" -f mysql_dockerfile .를 사용하여 로컬 이미지를 빌드 : 그것은 이미지라고 mysql_mac를 생성하고 지금 태그를 hub.docker에 밀어 것입니다. com

4 단계 : $ docker tag mysql_mac aamir2292/mysql_mac. 참고 내 로그인 이름은 docker-hub의 aamir2292입니다.

5 단계 : $ docker push aamir2292/mysql_mac

축하 당신은 MySQL의 이미지를 만들었습니다.