blob: b4aedbf82bd64f3d8c72e246955f609b18914625 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
captainVersion: 4
services:
$$cap_appname:
image: lscr.io/linuxserver/openssh-server:version-8.6_p1-r3
environment:
PUID: 1001
PGID: 1001
TZ: Europe/London
PUBLIC_KEY: $$cap_sshd_public_key
DOCKER_MODS: linuxserver/mods:openssh-server-ssh-tunnel
# USER_PASSWORD: $$cap_sshd_public_key
# - PUBLIC_KEY_FILE=/path/to/file #optional
# - PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys #optional
# - PUBLIC_KEY_URL=https://github.com/username.keys #optional
# - SUDO_ACCESS=false #optional
# - PASSWORD_ACCESS=false #optional
# - USER_PASSWORD=password #optional
# - USER_PASSWORD_FILE=/path/to/file #optional
USER_NAME: $$cap_sshd_username
volumes:
- $$cap_appname-config:/config
ports:
- $$cap_sshd_port:2222
caproverExtra:
notExposeAsWebApp: 'true'
caproverOneClickApp:
variables:
- id: $$cap_sshd_public_key
label: Your SSH public key
description: Enter your public key
- id: $$cap_sshd_username
label: Your SSH Username
defaultValue: 'caprover'
- id: $$cap_sshd_port
label: Your SSH exposed port (your host mapped port)
description: Enter a port number
defaultValue: '4646'
validRegex: /^\d+$/
instructions:
start: >-
The following app sets up an SSHd service in a container that you can use to connect to and inspect other container's volumes, or to get quick access to a test container.
IMPORTANT:
This setup uses **public key** login.
end: >-
The container is built and deployed. You can now connect to this container from your local machine by running the following command:
ssh -i /path/to/private.key $$cap_sshd_username@$$cap_appname.$$cap_root_domain -p $$cap_sshd_port
displayName: SSH Container
isOfficial: true
description: Just a simple container that has sshd installed so you can SSH directly into this container.
documentation: 'Taken from https://github.com/linuxserver/docker-openssh-server'
|