Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
Dockerfiles
Commits
ea19f8e2
Commit
ea19f8e2
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
SSH daemon WIP.
parent
ca3e38c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitlab-ci.yml
+15
-0
15 additions, 0 deletions
.gitlab-ci.yml
sshd/.dockerignore
+2
-0
2 additions, 0 deletions
sshd/.dockerignore
sshd/Dockerfile
+17
-0
17 additions, 0 deletions
sshd/Dockerfile
sshd/README.md
+3
-0
3 additions, 0 deletions
sshd/README.md
sshd/entrypoint
+13
-0
13 additions, 0 deletions
sshd/entrypoint
with
50 additions
and
0 deletions
.gitlab-ci.yml
+
15
−
0
View file @
ea19f8e2
...
...
@@ -105,3 +105,18 @@ push-httpd-bullseye:
needs
:
-
job
:
build-httpd-bullseye
artifacts
:
true
# sshd image:
build-sshd
:
extends
:
.build
variables
:
CONTEXT
:
sshd
push-sshd
:
extends
:
.push
variables
:
IMAGE
:
sshd
needs
:
-
job
:
build-sshd
artifacts
:
true
This diff is collapsed.
Click to expand it.
sshd/.dockerignore
0 → 100644
+
2
−
0
View file @
ea19f8e2
*
!entrypoint
This diff is collapsed.
Click to expand it.
sshd/Dockerfile
0 → 100644
+
17
−
0
View file @
ea19f8e2
ARG
BASEIMAGE=debian:testing-slim
FROM
${BASEIMAGE}
RUN
apt-get update
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
\
netcat-openbsd
\
openssh-server
\
&&
\
rm
-f
/etc/ssh/ssh_host_
*
&&
\
echo
>
/etc/ssh/sshd_config
&&
\
rm
-rf
/tmp/
*
/var/tmp/
*
/var/lib/apt/lists/
*
/var/cache/apt/archives/
*
COPY
entrypoint /entrypoint
EXPOSE
22
ENTRYPOINT
["/entrypoint"]
HEALTHCHECK
--start-period=5m CMD echo | nc localhost 22 | grep -q 'SSH-2.0-OpenSSH'
ENV
SSHD_ARGS="-De -o 'PermitRootLogin no' -o 'PasswordAuthentication no' -o 'ChallengeResponseAuthentication no' -o 'PrintMotd no' -o 'PidFile none' -o 'Subsystem sftp /usr/lib/openssh/sftp-server'"
ENV
EXTRA_SSHD_ARGS=""
CMD
["/usr/sbin/sshd", "$SSHD_ARGS", "$EXTRAS_SSHD_ARGS"]
This diff is collapsed.
Click to expand it.
sshd/README.md
0 → 100644
+
3
−
0
View file @
ea19f8e2
# sshd
> A dockerized SSH daemon.
This diff is collapsed.
Click to expand it.
sshd/entrypoint
0 → 100755
+
13
−
0
View file @
ea19f8e2
#!/bin/sh
set
-eux
if
[
!
-f
/etc/ssh/moduli
]
then
ssh-keygen
-G
/etc/ssh/moduli.candidates
ssh-keygen
-T
/etc/ssh/moduli
-f
/etc/ssh/moduli.candidates
rm
/etc/ssh/moduli.candidates
fi
ssh-keygen
-A
mkdir
-p
/run/sshd
eval
'exec "$@"'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment