File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # From PHP8.3-cli
2
+ FROM php:8.3-cli-alpine
3
+
4
+ RUN adduser -h /home/admin -s /home/admin/vendor/bin/phpterminal -D admin
5
+ RUN echo -n 'admin:admin' | chpasswd
6
+
7
+ WORKDIR /home/admin
8
+
9
+ RUN apk update
10
+ RUN apk add --update --no-cache git
11
+ RUN apk add --update --no-cache zip
12
+
13
+ RUN docker-php-ext-configure pcntl --enable-pcntl && docker-php-ext-install pcntl
14
+
15
+ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
16
+ RUN php composer-setup.php
17
+ RUN php -r "unlink('composer-setup.php');"
18
+ RUN mv composer.phar /home/admin/composer
19
+ RUN chmod +x /home/admin/composer
20
+ RUN /home/admin/composer require oyeaussie/phpfirewall
21
+ ENV COMPOSER_ALLOW_SUPERUSER=1
22
+
23
+ RUN mkdir /home/admin/terminaldata
24
+
25
+ RUN apk add --update --no-cache openssh
26
+ RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
27
+ RUN echo 'Port 2233' >> /etc/ssh/sshd_config
28
+ ENTRYPOINT ["/entrypoint.sh" ]
29
+ COPY entrypoint.sh /
30
+ RUN chown -R admin:admin /home/admin/
31
+
32
+ # Running
33
+ # docker run -d --name phpfirewall -h phpfirewall oyeaussie/phpfirewall
34
+ # Grab IP
35
+ # docker exec phpfirewall cat /etc/hosts | grep phpfirewall
36
+ # {container IP} phpfirewall
37
+ # Connect via ssh
38
+ # ssh -l admin -p 2233 {container IP}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ ssh-keygen -A
3
+ exec /usr/sbin/sshd -D -e " $@ "
You can’t perform that action at this time.
0 commit comments