Is there any way to user created in a container when i recreate a container?
I’m using Ubuntu image to create a container to ssh into to modify a few file.
I don’t wan’t to use the root user to ssh so i’m creating a user to ssh with and it’s working but if i recreate the container, my user needs to be recreated.
I’m using compose to builld the conaitner
ssh:
image: ubuntu:latest
container_name: school_ssh
tty: true
restart: unless-stopped
volumes:
- "./web:/home/websandbx"
- "./ssh-conf:/etc/ssh"
ports:
- "2200:22"
I haven’t seen any info on that subject,
I’m pretty sure I only need to keep the file that are used to configure the user, it’s password and it’s goup in volumes but I’m not sure which one