Skip to content

added gotty #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

added gotty #7

wants to merge 2 commits into from

Conversation

FloSch62
Copy link
Member

This lets you adhoc create a gotty webterminal
https://github.com/sorenisanerd/gotty

docker run --network clab --rm -i -t \
  --name gotty-adhoc \
  -p 8080:8080 \
  -v /etc/hosts:/etc/hosts \
  --entrypoint '' -d \
  ghcr.io/srl-labs/network-multitool \
  sh -c "gotty-service start 8080 admin admin2 && tail -f /var/log/gotty/gotty-8080.log"
❯ docker exec gotty-adhoc gotty-service status
GoTTY service is running on port 8080 (PID: 11)
Access web terminal at: http://<host-ip>:8080
Username: admin
Password: admin

Not as fancy as sshx, but fully local and with credentials

@FloSch62 FloSch62 requested a review from hellt April 20, 2025 15:29
Dockerfile Outdated
Comment on lines 51 to 61
RUN wget -q -O /tmp/gotty.tar.gz https://github.com/sorenisanerd/gotty/releases/download/v1.5.0/gotty_v1.5.0_linux_amd64.tar.gz && \
tar -zxf /tmp/gotty.tar.gz -C /usr/local/bin && \
rm /tmp/gotty.tar.gz && \
chmod +x /usr/local/bin/gotty

# Create directories for GoTTY service
RUN mkdir -p /var/run/gotty /var/log/gotty

COPY gotty-service /usr/local/bin/gotty-service
RUN chmod +x /usr/local/bin/gotty-service

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make it multi arch friendly by introducing a build image for gotty that uses go install way of installing gotty
then you just copy the binary from this build step to the target system

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it so its installed during a build stage and copied from it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants