Build php-proxy with a dockerfile
Based on https://github.com/Athlon1600/php-proxy-installer and https://github.com/Athlon1600/php-proxy
create the dockerfile
mkdir my-php-proxy && cd my-php-proxy
touch dockerfile
nano dockerfile
Contents of dockerfile
FROM debian:11
RUN apt update && apt install -y wget cron && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /scripts
WORKDIR /scripts
RUN wget https://raw.githubusercontent.com/Athlon1600/php-proxy-installer/master/install.sh
RUN chmod +x install.sh
RUN ./install.sh
- Dockerfile uses Debian 11 as base.
- Install wget (download using http) and cron (run scheduled jobs)
- Download and install scriptfile for php-proxy.
- Create docker image.
Build the docker image.
docker build -t my-php-proxy .
Run docker file.
docker run -d --name php-proxy-container -p 8080:80 my-php-proxy
Enter the docker container and run a bash shell from it.
docker container exec -it php-proxy-container /bin/bash