Skip to content

Commit

Permalink
add redis server
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Apr 19, 2024
1 parent 86411a7 commit 45fb75b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,8 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp

# Configure SSH server for SFTP and key-based authentication
#RUN mkdir /var/run/sshd \
# && sed -i 's/^#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config \
# && sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config \
# && sed -i 's/#AuthorizedKeysFile/AuthorizedKeysFile/' /etc/ssh/sshd_config \
# && sed -i 's/^Subsystem\s\+sftp\s\+\/usr\/lib\/openssh\/sftp-server/Subsystem sftp internal-sftp/' /etc/ssh/sshd_config \
# && echo 'Match User sftpuser\nChrootDirectory /var/www/%u\nForceCommand internal-sftp\nX11Forwarding no\nAllowTcpForwarding no' >> /etc/ssh/sshd_config

# Install Redis server package
RUN apt-get install -y redis-server

#Configure SSH server
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
Expand Down Expand Up @@ -207,4 +201,4 @@ EXPOSE 2222/tcp

ENTRYPOINT ["/usr/local/docker-entrypoint.sh"]
# Start PHP-FPM and Nginx servers
CMD /usr/local/php-fpm.sh & nginx -g "daemon off;" -c "/var/www/html/nginx.conf" & /usr/sbin/sshd -D
CMD /usr/local/php-fpm.sh & nginx -g "daemon off;" -c "/var/www/html/nginx.conf" & /usr/sbin/sshd -D & redis-server

0 comments on commit 45fb75b

Please sign in to comment.