add listen to devcontainer
This commit is contained in:
parent
0b9177a8ce
commit
104f93e9b0
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue