Skip to content

ssh example, but -slim instead of -alpine #1105

@johny-b

Description

@johny-b
  1. examples/ssh is a nice place to start with the VPN
  2. Many things don't work on -alpine images - e.g. pip3 install ray in my case, but this seems more general (from this article (...) some teams are moving away from alpine because these images can cause compatibility issues that are hard to debug. Specifically, if using python images, some wheels are built to be compatible with Debian and will need to be recompiled to work with an Apline-based image.
  3. Running the same example on a -slim image requires some non-trivial (... for me) changes.

I think these non-trivial changes include:

RUN apt-get update
RUN apt-get install -y openssh-server iproute2 tcpdump net-tools screen

instead of

RUN apk add --no-cache --update bash openssh iproute2 tcpdump net-tools screen

and

script.run("/bin/bash", "-c", "ssh-keygen -A")
script.run("/bin/bash", "-c", f'echo -e "{password}\n{password}" | passwd')
script.run("/bin/bash", "-c", "service ssh start")

instead of

script.run("/bin/bash", "-c", "syslogd")
script.run("/bin/bash", "-c", "ssh-keygen -A")
script.run("/bin/bash", "-c", f'echo -e "{password}\n{password}" | passwd')
script.run("/bin/bash", "-c", "/usr/sbin/sshd")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions