Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
DoyunShin committed May 2, 2024
1 parent c301698 commit 4970ff3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
openssh-server \
sudo

RUN useradd -m -s /bin/bash sparcs && \
RUN userdel -r ubuntu && \
useradd -m -s /bin/bash sparcs && \
chown -R sparcs:sparcs /home/sparcs && \
adduser sparcs sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ services:
- "15000:22"
- "15001:3000"
- "15002:8000"
#volumes:
# - "./home:/home/sparcs"
volumes:
- "./home:/home/sparcs"
environment:
- NEW_PASSWORD=1234
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

echo "sparcs:$NEW_PASSWORD" | chpasswd
if [ -f /home/sparcs/.profile ]; then
tar xvf /sparcs-home.tar.gz -C /home/sparcs
if [ ! -f /home/sparcs/.profile ]; then
tar -xzf /sparcs-home.tar.gz -C /
fi
mkdir -p /var/run/sshd
/usr/sbin/sshd -D
Expand Down

0 comments on commit 4970ff3

Please sign in to comment.