Skip to content

andy12011/golang-docker-prac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

golang-docker-prac

  • FROM: 指定base image
  • WORKDIR: 指定docker執行起來時候的預設目錄位置
  • EXPOSE: 指定所有發布的port
  • CMD: 指定Instance啟動後所要執行的指令
  • ENTRYPOINT: 指令Instance啟動後,程式的進入點 語法筆記

    https://blog.gtwang.org/linux/docker-commands-and-container-management-tutorial/

    docker build -t andy:gotest .

    #container-port:local-port

    docker run --rm -p 7000:7000 -d andy

    docker run --rm -p 7000:7000 -d andy:gotest

    docker ps //顯示containerId

    docker stop d491a189f632 //停止

    docker images //顯示所有映像檔

    docker tag {imageId} {accountName}/imageName:{version} //先做版本印象檔 docker push {accountName}/imageName:{version} //推上

  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published