fix(pidproxy): handle new line
example: sshd
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
FROM suyono/wingmate:alpine as source
|
||||
|
||||
FROM alpine:3.19
|
||||
|
||||
RUN apk update && apk add tzdata openssh-server && \
|
||||
ln -s /usr/share/zoneinfo/Australia/Sydney /etc/localtime && ssh-keygen -A
|
||||
|
||||
COPY --from=source /usr/local/bin/wingmate /usr/local/bin/
|
||||
COPY --from=source /usr/local/bin/wmpidproxy /usr/local/bin/
|
||||
ADD --chmod=755 example/ssh-docker/entry.sh /usr/local/bin/entry.sh
|
||||
ADD --chmod=755 example/ssh-docker/etc /etc
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/entry.sh" ]
|
||||
CMD [ "/usr/local/bin/wingmate" ]
|
||||
7
example/ssh-docker/entry.sh
Normal file
7
example/ssh-docker/entry.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
exec "$@"
|
||||
else
|
||||
exec /usr/local/bin/wingmate
|
||||
fi
|
||||
3
example/ssh-docker/etc/wingmate/service/sshd.sh
Normal file
3
example/ssh-docker/etc/wingmate/service/sshd.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/local/bin/wmpidproxy --pid-file /var/run/sshd.pid -- /usr/sbin/sshd
|
||||
Reference in New Issue
Block a user