This repository was archived by the owner on Jun 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ ADD ./container /
15
15
ADD ./LICENSE /
16
16
17
17
RUN set -euo pipefail && \
18
- dnf install -y cockpit-ws-${COCKPIT_VERSION} cockpit-bridge-${COCKPIT_VERSION} python3 openssh-clients && \
18
+ dnf install -y supervisor cockpit-ws-${COCKPIT_VERSION} cockpit-bridge-${COCKPIT_VERSION} python3 openssh-clients && \
19
19
dnf clean all && \
20
20
echo "NAME=default\n ID=default" > /etc/os-release && \
21
21
chmod 755 /usr/local/bin/*
22
22
23
23
ENV COCKPIT_SSH_KEY_PATH /etc/cockpit/identity
24
24
25
- CMD [ "/usr/local/ bin/start" ]
25
+ ENTRYPOINT [ "/usr/bin/supervisord" , "-c" , "/etc/supervisord.conf" ]
Original file line number Diff line number Diff line change @@ -86,19 +86,18 @@ You can also specify the `known_hosts` file Cockpit will use to check fingerprin
86
86
The default template for the ` cockpit.conf ` only allows username and password authentication.
87
87
88
88
However, the image comes pre-packaged with an
89
- [ utility] ( https://github.com/realk1ko/cockpit-container/blob/main/container/usr/local/bin/cockpit-auth-ssh-key ) created
90
- by
91
- the [ Cockpit Project Team] ( https://github.com/cockpit-project ) that allows you to use a ** single** specific SSH key as
92
- identity for Cockpit when connecting to managed hosts.
89
+ [ utility] ( https://github.com/realk1ko/cockpit-container/blob/main/container/usr/local/libexec/cockpit-auth-ssh-key )
90
+ created by the [ Cockpit Project Team] ( https://github.com/cockpit-project ) that allows you to use a ** single** specific
91
+ SSH key as identity for Cockpit when connecting to managed hosts.
93
92
94
93
To use key authentication you will need to append the following lines to the ` cockpit.conf ` file:
95
94
96
95
```
97
96
[Basic]
98
- Command = /usr/local/bin /cockpit-auth-ssh-key
97
+ Command = /usr/local/libexec /cockpit-auth-ssh-key
99
98
100
99
[Ssh-Login]
101
- Command = /usr/local/bin /cockpit-auth-ssh-key
100
+ Command = /usr/local/libexec /cockpit-auth-ssh-key
102
101
```
103
102
104
103
Per default the container will use the key stored at ` /etc/cockpit/identity ` , if it exists. You can provide such a file
Original file line number Diff line number Diff line change
1
+ [supervisord]
2
+ nodaemon=true
3
+ pidfile=/tmp/supervisord.pid
4
+ logfile=/dev/fd/1
5
+ logfile_maxbytes=0
6
+ user=root
7
+ group=root
8
+
9
+ [program:ssh-agent]
10
+ priority=0
11
+ command=/usr/bin/ssh-agent -D -a /tmp/ssh-agent.sock
12
+ autorestart=true
13
+ user=root
14
+ group=root
15
+
16
+ [program:cockpit-start]
17
+ priority=1
18
+ environment=SSH_AUTH_SOCK=/tmp/ssh-agent.sock
19
+ command=/usr/local/bin/cockpit-start
20
+ autorestart=true
21
+ user=root
22
+ group=root
Original file line number Diff line number Diff line change @@ -11,8 +11,5 @@ set -euo pipefail
11
11
# create default configuration file if it does not exist
12
12
[[ -f /etc/cockpit/cockpit.conf ]] || cp /usr/local/etc/cockpit-container/cockpit.conf.template /etc/cockpit/cockpit.conf
13
13
14
- # startup of ssh-agent
15
- eval $( ssh-agent -s)
16
-
17
14
# startup of cockpit
18
15
exec /usr/libexec/cockpit-ws --local-ssh
File renamed without changes.
You can’t perform that action at this time.
0 commit comments