Last active
July 11, 2019 06:04
-
-
Save nntsugu/eabdae94d057f8016ee1a702c8d88732 to your computer and use it in GitHub Desktop.
Docker runで起動したコンテナにすぐログインしたい(docker psとかコピペがめんどくさい) ref: https://qiita.com/nntsugu/items/1fed4ff37afd845d6a7f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash | |
cd ${PATH to Dockerfile};pwd | |
export DREP=<<REPOSITORY_NAME>> | |
export DTAG=<<TAG>> | |
docker build . -t ${DREP}:${DTAG} | |
docker run -itd ${DREP}:${DTAG} | |
docker exec -it $(docker ps -lq) bash | |
docker stop $(docker ps -lq) & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment