Last active
December 13, 2017 05:19
-
-
Save RyosukeKamei/fd489469cc74427d8a41184cf698e510 to your computer and use it in GitHub Desktop.
Docker Tips コンテナ上でコマンドを実行する(dockerとdocker-composeを使った場合)~アジャイルでDevOpsなシステム構築実践~ ref: https://qiita.com/RyosukeKamei/items/ca4cf8016733e4d6049e
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
$ docker-compose exec {サービス名} {コマンド} |
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
$ docker exec -it {コンテナ名} {コマンド} |
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
### Workspace Utilities Container ########################### | |
workspace: # ←これがサービス名 | |
build: | |
context: ./workspace | |
args: | |
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} | |
... 略 ... |
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
$ docker exec -it laradock_workspace_1 ls |
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
$ docker-compose exec workspace ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment