-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from threefoldtech/mass_dep_nginx
Mass dep nginx
- Loading branch information
Showing
6 changed files
with
47 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,13 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt update && \ | ||
apt -y install wget openssh-server nginx | ||
|
||
RUN wget -O /sbin/zinit https://github.com/threefoldtech/zinit/releases/download/v0.2.14/zinit && \ | ||
chmod +x /sbin/zinit | ||
|
||
COPY zinit /etc/zinit | ||
COPY start.sh /start.sh | ||
|
||
RUN chmod +x /sbin/zinit && chmod +x /start.sh | ||
ENTRYPOINT ["zinit", "init"] |
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,19 @@ | ||
# Development Guide for Mass_dep image | ||
|
||
#### Image | ||
image contains only ssh and nginx | ||
|
||
### Pull the image | ||
```bash | ||
docker pull threefolddev/nginx-massdep | ||
``` | ||
|
||
### Build the image | ||
```bash | ||
docker build -t threefolddev/nginx-massdep . | ||
``` | ||
|
||
### RUN the image | ||
```bash | ||
sudo docker run -d --name <container_name> threefolddev/nginx-massdep | ||
``` |
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,8 @@ | ||
#!/bin/bash | ||
mkdir -p /var/run/sshd | ||
mkdir -p /root/.ssh | ||
touch /root/.ssh/authorized_keys | ||
|
||
chmod 700 /root/.ssh | ||
chmod 600 /root/.ssh/authorized_keys | ||
echo "daemon off;" >> /etc/nginx/nginx.conf |
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 @@ | ||
exec: /usr/sbin/nginx -g 'daemon off;' |
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,3 @@ | ||
exec: /start.sh | ||
log: stdout | ||
oneshot: true |
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,3 @@ | ||
exec: /usr/sbin/sshd -D | ||
after: | ||
- ssh-init |