From 104f93e9b0eefe9e020a76e8c3a94a33939c919c Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Thu, 31 Jul 2025 23:23:30 -0600 Subject: [PATCH] add listen to devcontainer --- .devcontainer/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 76ed434..3b66541 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,10 @@ +FROM golang:1-alpine AS build-listen + +WORKDIR /usr/src/listen +RUN apk upgrade --no-cache && apk add --no-cache git +RUN git clone https://forge.steck.dev/bryson/listen . +RUN go build -ldflags "-s -w" . + FROM fedora:latest AS devcontainer ARG UID="1000" ARG GID="1000" @@ -19,6 +26,11 @@ RUN --mount=type=secret,id=key,target=/root/id.pub \ RUN groupadd -g $GID dev RUN useradd -u $UID -g $GID -lN dev RUN chown dev:dev /etc/ssh/ssh_host* /etc/ssh/authorized_keys /etc/ssh/sshd_config + +# copy data from other stages +COPY --from=build-listen /usr/src/listen/listen /usr/local/bin + +# final configuration USER dev WORKDIR /volume/${BASENAME} EXPOSE 2222/tcp