Forward ssh2 ports into docker
This commit is contained in:
parent
45f63935cd
commit
5bceaa0d47
24 changed files with 745 additions and 117 deletions
1
internal/dis/component/ssh2/ssh2/.dockerignore
Normal file
1
internal/dis/component/ssh2/ssh2/.dockerignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
data
|
||||
5
internal/dis/component/ssh2/ssh2/Dockerfile
Normal file
5
internal/dis/component/ssh2/ssh2/Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FROM docker.io/library/docker:20.10-cli
|
||||
|
||||
COPY wdcli /wdcli
|
||||
EXPOSE 2222
|
||||
CMD ["/wdcli","--internal-in-docker","ssh","--private-key-path", "/data/", "--bind","0.0.0.0:2222"]
|
||||
23
internal/dis/component/ssh2/ssh2/docker-compose.yml
Normal file
23
internal/dis/component/ssh2/ssh2/docker-compose.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
dis:
|
||||
build: .
|
||||
restart: always
|
||||
environment:
|
||||
CONFIG_PATH: ${CONFIG_PATH}
|
||||
ports:
|
||||
- "2223:2222"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "${CONFIG_PATH}:${CONFIG_PATH}:ro"
|
||||
- "${DEPLOY_ROOT}:${DEPLOY_ROOT}:rw"
|
||||
- "${GLOBAL_AUTHORIZED_KEYS_FILE}:${GLOBAL_AUTHORIZED_KEYS_FILE}:ro"
|
||||
- "${SELF_OVERRIDES_FILE}:${SELF_OVERRIDES_FILE}:ro"
|
||||
- "${SELF_RESOLVER_BLOCK_FILE}:${SELF_RESOLVER_BLOCK_FILE}:ro"
|
||||
- "./data/:/data/"
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${DOCKER_NETWORK_NAME}
|
||||
external: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue