Project:Access Docker container: Difference between revisions
From MaRDI portal
EloiFerrer (talk | contribs) Created page with "There are two options to access and execute commands inside a docker container in production: * Option 1: Directly through the server ** SSH into the server: <code>shh mardi02</code> ** Navigate into the portal-compose directory: <code>cd portal-compose</code> ** Access the container with bash: <code>docker exec -it <container_name> bash</code> * Option 2: Through portainer ** Login into [https://portainer.portal.mardi4nfdi.de portainer] with your credentials. ** Click..." |
EloiFerrer (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
* Option 2: Through portainer | * Option 2: Through portainer | ||
** Login into [https://portainer.portal.mardi4nfdi.de portainer] with your credentials. | ** Login into [https://portainer.portal.mardi4nfdi.de portainer] with your credentials. | ||
** | ** Under 'Environment' click 'local' and then click 'containers' in the side panel on the left. | ||
** Click on the container you want to access. | ** Click on the container you want to access. | ||
** Click '>_ Console' and 'Connect' to access the container. | ** Click '>_ Console' and 'Connect' to access the container. |
Revision as of 07:55, 15 April 2024
There are two options to access and execute commands inside a docker container in production:
- Option 1: Directly through the server
- SSH into the server:
shh mardi02
- Navigate into the portal-compose directory:
cd portal-compose
- Access the container with bash:
docker exec -it <container_name> bash
- SSH into the server:
- Option 2: Through portainer
- Login into portainer with your credentials.
- Under 'Environment' click 'local' and then click 'containers' in the side panel on the left.
- Click on the container you want to access.
- Click '>_ Console' and 'Connect' to access the container.