Add initial Docker setup with Nginx, SSH, and Tor services
This commit is contained in:
parent
2da450b796
commit
81cc7c3b43
17
Dockerfile
17
Dockerfile
@ -0,0 +1,17 @@
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add --no-cache nginx, openssh, tor \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY torrc /etc/tor/torrc
|
||||
COPY sshd_config /etc/ssh/sshd_config
|
||||
COPY index.html /var/www/html/index.html
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
|
||||
EXPOSE 4242
|
||||
|
||||
CMD ["sh", "-c", "nginx && tor -f /etc/tor/torrc"]
|
||||
13
entrypoint.sh
Normal file
13
entrypoint.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Start the SSH service
|
||||
/usr/sbin/sshd -D &
|
||||
|
||||
# Start the Nginx service
|
||||
nginx -g 'daemon off;' &
|
||||
|
||||
# Start the Tor service
|
||||
tor -f /etc/tor/torrc &
|
||||
|
||||
# Keep the script running to prevent container exit
|
||||
tail -f /dev/null
|
||||
24
index.html
Normal file
24
index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to ft_onion</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 50px;
|
||||
}
|
||||
h1 {
|
||||
color: #2c3e50;
|
||||
}
|
||||
p {
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to ft_onion</h1>
|
||||
<p>This is a hidden service running on Tor.</p>
|
||||
</body>
|
||||
</html>
|
||||
10
nginx.conf
Normal file
10
nginx.conf
Normal file
@ -0,0 +1,10 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name
|
||||
|
||||
location / {
|
||||
root /var/www/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
10
sshd_config
Normal file
10
sshd_config
Normal file
@ -0,0 +1,10 @@
|
||||
# Basic SSHD Configuration
|
||||
|
||||
Port 4242
|
||||
PermitRootLogin yes
|
||||
PasswordAuthentication yes
|
||||
ChallengeResponseAuthentication no
|
||||
UsePAM yes
|
||||
X11Forwarding no
|
||||
AllowTcpForwarding no
|
||||
PermitEmptyPasswords no
|
||||
Loading…
Reference in New Issue
Block a user