Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Syntax3rror404 committed Aug 24, 2024
1 parent bcafa27 commit ea24161
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ RUN addgroup --gid 1001 devgroup && \
echo "dev ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# SSH configuration for rootless container
RUN mkdir -p /home/dev/.ssh /home/dev/var/run/sshd && \
RUN mkdir -p /etc/ssh/keys /var/run/sshd && \
ssh-keygen -A && \
ssh-keygen -t rsa -f /etc/ssh/keys/ssh_host_rsa_key -N '' && \
chown -R root:root /etc/ssh/keys && \
chmod 600 /etc/ssh/keys/* && \
echo 'dev:dev' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config && \
mkdir -p /home/dev/ssh_host_keys && \
ssh-keygen -t rsa -f /home/dev/ssh_host_keys/ssh_host_rsa_key -N '' && \
chown -R dev:devgroup /home/dev/.ssh /home/dev/var/run/sshd /home/dev/ssh_host_keys
sed -i 's|#PermitRootLogin prohibit-password|PermitRootLogin no|' /etc/ssh/sshd_config && \
sed -i 's|#PasswordAuthentication yes|PasswordAuthentication no|' /etc/ssh/sshd_config

# Adjust permissions for /usr/local and home directories
RUN chown -R dev:devgroup /usr/local /home/dev
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1

image:
repository: ghcr.io/syntax3rror404/k8s-devmachine
tag: b180370a1d42efea8b3c6e630e4eab1cc9207ddd95b8a1f29929ae235e9f3e7c
tag: master
pullPolicy: IfNotPresent

service:
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Start SSH service
/usr/sbin/sshd -D -f /home/dev/ssh_host_keys/sshd_config &
/usr/sbin/sshd -D -f /etc/ssh/sshd_config &

# Check if any additional commands were passed and execute them
if [ "$#" -gt 0 ]; then
Expand Down

0 comments on commit ea24161

Please sign in to comment.