Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create slim version of sshnpd docker container that connects to hosts sshd #807

Merged
merged 18 commits into from Feb 13, 2024

Conversation

cconstab
Copy link
Member

@cconstab cconstab commented Feb 9, 2024

- What I did
Created a docker container that holds sshnpd srv and statically linked versions of ssh and ssh-keygen for x86/Arm65/ArmV7
- How I did it
Created Dockerfile that builds sshnpd and srv, wrote script that builds openssh and libs into static binaries.
Isolated bugs in the builds of openssh in Docker on Armv7
Added build to the existing GitHub docker build action
- How to verify it
Built manually and tested - to be documented on noports.com
running container using the --host and --user arguments on docker run to point the containers localhost to the hosts and mounting ~/ as /atsign in the container allows the container to provide access to the ssh daemon on the host.
- Description for the changelog

slim version of sshnpd docker container that connects to hosts sshd (typically 34mb as against 300mb for full container)

Copy link
Member

@cpswan cpswan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good that we have build instructions in the Dockerfile, but how does somebody use this?

I think we need some extra README to explain why this is useful and how it can be used.

Also are there any tests we can run that will exercise the image and validate that it's doing what we expect?

packages/dart/sshnoports/tools/Dockerfile.sshnpd-slim Outdated Show resolved Hide resolved
autoreconf
./configure LIBS="-lpthread" "--with-ldflags=-static" "--prefix=$root" "--exec-prefix=$root" --with-privsep-user=nobody --with-privsep-path="$prefix/var/empty" "--with-ssl-dir=$root"
make
cd "$top"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finish with a newline

packages/dart/sshnoports/tools/Dockerfile.sshnpd-slim Outdated Show resolved Hide resolved
@cconstab
Copy link
Member Author

As mentioned in the PR the instructions will be coning to the docs site.
Ideas welcome on how to test

@cconstab
Copy link
Member Author

@cpswan @JeremyTubongbanua I took a look at the existing tests and need some help adapting them to test this build.

@gkc
Copy link
Contributor

gkc commented Feb 13, 2024

@cconstab I've got an overhaul of the e2e tests in the works which I will complete this week, will ensure this is covered also.

@gkc gkc merged commit e7497c1 into trunk Feb 13, 2024
6 checks passed
@gkc gkc deleted the slim-docker-tools-colin branch February 13, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants