ssh working ok, need to test with two separate computers when I have access to 2 ubuntu machines
Create and publish a Docker image / build-and-push-image (push) Successful in 5m59s
Details
Create and publish a Docker image / build-and-push-image (push) Successful in 5m59s
Details
This commit is contained in:
parent
12023866ee
commit
6fbae80d29
13
Dockerfile
13
Dockerfile
|
@ -14,8 +14,21 @@ RUN apt-get update && apt-get install -y \
|
||||||
util-linux \
|
util-linux \
|
||||||
bsdmainutils \
|
bsdmainutils \
|
||||||
vim \
|
vim \
|
||||||
|
openssh-server \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create necessary directories for SSH
|
||||||
|
RUN mkdir /var/run/sshd
|
||||||
|
|
||||||
|
# Create the user 'spiri' and set passwords for both 'root' and 'spiri'
|
||||||
|
RUN useradd -m spiri && \
|
||||||
|
echo 'root:spiri-friend' | chpasswd && \
|
||||||
|
echo 'spiri:spiri-friend' | chpasswd && \
|
||||||
|
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||||
|
|
||||||
|
# Expose SSH port
|
||||||
|
EXPOSE 22
|
||||||
|
|
||||||
# Clone the xbnet repository
|
# Clone the xbnet repository
|
||||||
RUN git clone https://github.com/jgoerzen/xbnet.git /usr/src/xbnet
|
RUN git clone https://github.com/jgoerzen/xbnet.git /usr/src/xbnet
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,10 @@ echo "Starting entrypoint.sh"
|
||||||
echo "Setting associated environment variables. Calling /set-env-vars.sh"
|
echo "Setting associated environment variables. Calling /set-env-vars.sh"
|
||||||
source /set-env-vars.sh
|
source /set-env-vars.sh
|
||||||
|
|
||||||
|
# Start SSH in the background
|
||||||
|
echo "Starting SSH service..."
|
||||||
|
/usr/sbin/sshd
|
||||||
|
|
||||||
# Main loop
|
# Main loop
|
||||||
loop() {
|
loop() {
|
||||||
echo "Starting loop"
|
echo "Starting loop"
|
||||||
|
|
Loading…
Reference in New Issue