initial version
This commit is contained in:
commit
86a763e0d9
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
openssh-server \
|
||||
curl \
|
||||
telnet \
|
||||
net-tools \
|
||||
screen \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD start.sh /
|
||||
|
||||
EXPOSE 22/tcp
|
||||
|
||||
CMD /start.sh
|
||||
|
||||
HEALTHCHECK CMD netstat -tnlp | grep '0.0.0.0:22' || exit 1
|
33
README.md
Normal file
33
README.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Jumpbox Docker container
|
||||
|
||||
* Debian slim based image
|
||||
* OpenSSH server
|
||||
|
||||
# Supported tags and respective `Dockerfile` links
|
||||
|
||||
- [`latest`](https://git.nethuis.nl/pommi/docker-jumpbox/Dockerfile)
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
$ docker run -it \
|
||||
--name jumpbox \
|
||||
-v $(pwd)/authorized_keys:/root/.ssh/authorized_keys \
|
||||
-p 1022:22 \
|
||||
pommib/jumpbox:latest
|
||||
```
|
||||
|
||||
# docker-compose
|
||||
|
||||
```
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
jumpbox:
|
||||
container_name: jumpbox
|
||||
image: pommib/jumpbox:latest
|
||||
ports:
|
||||
- "1022:22/tcp"
|
||||
volumes:
|
||||
- '${PWD}/authorized_keys:/root/.ssh/authorized_keys'
|
||||
```
|
9
build.sh
Executable file
9
build.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
IMAGE=pommib/jumpbox:latest
|
||||
docker pull $IMAGE
|
||||
docker pull debian:bookworm-slim
|
||||
docker build --no-cache -t $IMAGE ./
|
||||
docker push $IMAGE
|
14
rebuild.sh
Executable file
14
rebuild.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
updates_available () {
|
||||
docker pull $1
|
||||
if test "$(docker run -it --rm $1 /bin/sh -c 'apt -qqq update && apt -qq list --upgradable')" != ""; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if updates_available pommib/jumpbox:latest; then
|
||||
./build.sh
|
||||
fi
|
Loading…
Reference in New Issue
Block a user