Require COMMAND env var, remove default, add docker-compose example
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 16s

This commit is contained in:
2025-11-06 14:47:24 +01:00
parent 8e6cbe38f0
commit c0a1b6fca8
3 changed files with 15 additions and 2 deletions

View File

@@ -14,8 +14,6 @@ RUN apk add --no-cache ca-certificates
COPY --from=builder /app/sshserver /usr/local/bin/sshserver
ENV COMMAND /app/tui
EXPOSE 22
CMD ["/usr/local/bin/sshserver"]

12
docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
services:
ssh-server:
image: dcorral/ssh-remote:latest
ports:
- "22:22"
volumes:
- ../tui:/app/tui:ro
cap_add:
- SYS_CHROOT
environment:
- COMMAND=/app/tui
restart: unless-stopped

View File

@@ -14,6 +14,9 @@ import (
)
func main() {
if os.Getenv("COMMAND") == "" {
log.Fatal("COMMAND environment variable must be set")
}
config := &ssh.ServerConfig{
NoClientAuth: true,
}