forked from tmicka23/basic-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(basic remote server): add dockerfile and entrypoint script
* setup basic ubuntu image to a minimal remote server
- Loading branch information
0 parents
commit e4a1255
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y openssh-server git vim htop \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN yes | unminimize | ||
|
||
RUN echo "root:demo" | chpasswd | ||
RUN echo "PermitRootLogin Yes" >> /etc/ssh/sshd_config | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
CMD ["bash"] | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
service --status-all | ||
service ssh restart | ||
service --status-all | ||
|
||
exec "$@" |