Dears, I'm trying to create a Alpine lab addon to play with, but need access via ssh, I would like to install services to be exposure to HA, such as upmpdcli, but seems complicated use network_mode:host having ssh access.
Currently I'm using this configuration
[core-ssh alpine-lab]$ cat config.yaml
name: "Alpine Lab"
description: "Contenedor Alpine con SSH para experimentos variados"
version: "1.0.7"
slug: "alpine_lab"
arch:
- aarch64
- amd64
init: false
ports:
22/tcp: 2222
49152/tcp: 49152
From Dockerfile
FROM alpine:latest
RUN apk add --no-cache openssh bash upmpdcli nano curl
Generar llaves (obligatorio para SSH)
RUN ssh-keygen -A
Cambiar contraseƱa
RUN echo "root:XXXXXX" | chpasswd
RUN sed -i 's/#PermitRootLogin./PermitRootLogin yes/' /etc/ssh/sshd_config &&
sed -i 's/#PasswordAuthentication./PasswordAuthentication yes/' /etc/ssh/sshd_config
Exponer el puerto
EXPOSE 22
LANZAMIENTO DIRECTO:
-D: No va a segundo plano
-e: Manda errores al log de HA
CMD ["/usr/sbin/sshd", "-D", "-e"]
With this configuration I'm able to access via SSH but not able to see upmpdcli service...
I was thinking to share all services ports, but maybe conflict with HA HOst.. Any recomendation?