mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: connect terminal service to backend
feat: put terminal service into container refactor: separate main into terminal and websocket feat: create zsh using commander in home feat: pass backendUrl to container feat: pass token to ws server to cmd-hook feat: gen terminal access token for frontend feat: success to connect through traefik fix: handle invalid jwt feat: connect to session container via traefik
This commit is contained in:
1 parent
0b08a9a5d9
commit
5e81db2759
20 files changed
+281
-209
No files matched your search
+13
-13
@@ -1,15 +1,18 @@
|
||||
FROM golang:1.24-alpine as builder
|
||||
|
||||
FROM golang:1.24-alpine as cmd-hook-builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./services/cmd-hook/go.mod ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY ./services/cmd-hook ./
|
||||
|
||||
RUN go build -o cmd-hook
|
||||
|
||||
FROM golang:1.24-alpine as terminal-builder
|
||||
WORKDIR /app
|
||||
COPY ./services/terminal-service/go.mod ./
|
||||
COPY ./services/terminal-service/go.sum ./
|
||||
RUN go mod download
|
||||
COPY ./services/terminal-service ./
|
||||
RUN go build -o terminal-service
|
||||
|
||||
FROM debian:bookworm-slim as main
|
||||
|
||||
LABEL maintainer="wancat@wancat.cc"
|
||||
@@ -18,16 +21,13 @@ RUN apt-get update && apt-get install -y \
|
||||
vim \
|
||||
zsh \
|
||||
curl \
|
||||
openssh-server
|
||||
|
||||
COPY --from=builder /app/cmd-hook /usr/local/bin/cmd-hook
|
||||
sudo
|
||||
COPY ./quests/.includes/zshrc /etc/zsh/zshrc
|
||||
RUN rm -f /etc/motd /etc/issue /etc/issue.net /etc/update-motd.d/*
|
||||
RUN rm -rf /etc/skel && mkdir -p /etc/skel
|
||||
RUN mkdir -p /etc/ssh/authorized_keys && chmod 755 /etc/ssh/authorized_keys
|
||||
COPY ./quests/.includes/sshd_config /etc/ssh/sshd_config
|
||||
COPY ./quests/entrypoint.sh /entrypoint.sh
|
||||
COPY --from=cmd-hook-builder /app/cmd-hook /usr/local/lib/cmd-hook/cmd-hook
|
||||
COPY --from=terminal-builder /app/terminal-service /usr/local/lib/terminal-service/terminal-service
|
||||
|
||||
EXPOSE 22
|
||||
EXPOSE 9090
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||
Reference in new issue
Block a user