mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-18 17:57:39 +03:00
add Dockerfile
This commit is contained in:
parent
e528f519bc
commit
95a6577cda
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM alpine:latest as build
|
||||||
|
|
||||||
|
ADD . /sslh
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apk add \
|
||||||
|
gcc \
|
||||||
|
libconfig-dev \
|
||||||
|
make \
|
||||||
|
musl-dev \
|
||||||
|
pcre-dev \
|
||||||
|
perl && \
|
||||||
|
cd /sslh && \
|
||||||
|
make sslh-select && \
|
||||||
|
strip sslh-select
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
COPY --from=build /sslh/sslh-select /sslh
|
||||||
|
|
||||||
|
RUN apk --no-cache add libconfig pcre
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/sslh", "--foreground"]
|
9
Makefile
9
Makefile
@ -97,6 +97,15 @@ $(MAN): sslh.pod Makefile
|
|||||||
release:
|
release:
|
||||||
git archive master --prefix="sslh-$(VERSION)/" | gzip > /tmp/sslh-$(VERSION).tar.gz
|
git archive master --prefix="sslh-$(VERSION)/" | gzip > /tmp/sslh-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
# Build docker image
|
||||||
|
docker:
|
||||||
|
docker image build -t "sslh:${VERSION}" .
|
||||||
|
docker image tag "sslh:${VERSION}" sslh:latest
|
||||||
|
|
||||||
|
docker-clean:
|
||||||
|
yes | docker image rm "sslh:${VERSION}" sslh:latest
|
||||||
|
yes | docker image prune
|
||||||
|
|
||||||
# generic install: install binary and man page
|
# generic install: install binary and man page
|
||||||
install: sslh $(MAN)
|
install: sslh $(MAN)
|
||||||
mkdir -p $(DESTDIR)/$(BINDIR)
|
mkdir -p $(DESTDIR)/$(BINDIR)
|
||||||
|
48
README.md
48
README.md
@ -450,6 +450,54 @@ many connections to ssh from the same IP address...)
|
|||||||
|
|
||||||
See example files in scripts/fail2ban.
|
See example files in scripts/fail2ban.
|
||||||
|
|
||||||
|
Docker image
|
||||||
|
------------
|
||||||
|
|
||||||
|
How to use
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Build docker image
|
||||||
|
|
||||||
|
make docker
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker container run \
|
||||||
|
--rm \
|
||||||
|
-it \
|
||||||
|
--listen=0.0.0.0:443 \
|
||||||
|
--ssh=hostname:22 \
|
||||||
|
--tlshostname:443 \
|
||||||
|
sslh:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
docker-compose example
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
sslh:
|
||||||
|
image: sslh:latest
|
||||||
|
hostname: sslh
|
||||||
|
ports:
|
||||||
|
- 443:443/tcp
|
||||||
|
command: --listen=0.0.0.0:443 --tlshostname:443 --openvpn=openvpn:1194
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
- openvpn
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: nginx
|
||||||
|
hostname: nginx
|
||||||
|
|
||||||
|
openvpn:
|
||||||
|
image: openvpn:latest
|
||||||
|
hostname: openvpn
|
||||||
|
```
|
||||||
|
|
||||||
Comments? Questions?
|
Comments? Questions?
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user