2024-09-05 19:49:52 +00:00
|
|
|
FROM alpine:3.16 AS builder
|
2021-07-03 15:51:32 +00:00
|
|
|
#
|
|
|
|
# Include dist
|
2024-09-11 10:42:17 +00:00
|
|
|
COPY dist/ /root/dist/
|
2021-07-03 15:51:32 +00:00
|
|
|
#
|
|
|
|
# Install packages
|
2024-09-11 12:41:32 +00:00
|
|
|
RUN apk -U add --no-cache \
|
|
|
|
build-base \
|
2024-02-28 18:07:22 +00:00
|
|
|
git \
|
|
|
|
libcap && \
|
2021-07-03 15:51:32 +00:00
|
|
|
#
|
|
|
|
# Install endlessh from git
|
|
|
|
git clone https://github.com/skeeto/endlessh /opt/endlessh && \
|
|
|
|
cd /opt/endlessh && \
|
|
|
|
git checkout dfe44eb2c5b6fc3c48a39ed826fe0e4459cdf6ef && \
|
|
|
|
make && \
|
|
|
|
mv /opt/endlessh/endlessh /root/dist
|
|
|
|
#
|
2024-11-26 16:05:30 +00:00
|
|
|
FROM alpine:3.20
|
2021-07-03 15:51:32 +00:00
|
|
|
#
|
|
|
|
COPY --from=builder /root/dist/* /opt/endlessh/
|
|
|
|
#
|
|
|
|
STOPSIGNAL SIGINT
|
2024-11-26 16:05:30 +00:00
|
|
|
USER 2000:2000
|
2021-07-03 15:51:32 +00:00
|
|
|
WORKDIR /opt/endlessh/
|
|
|
|
CMD ./endlessh -f endlessh.conf >/var/log/endlessh/endlessh.log
|