Oggi mi è arrivata una richiesta di un caro amico che ha la necessità di clonare un sito dinamico in una versione statica su richiesta di un suo cliente.
Con questi semplici comandi è possibile:
- Clonare il sito
- Creare l'immagine con Apache su Docker
- Servire il sito con Docker
Comandi bash
mkdir sitoweb
cd sitoweb
wget -k -K -E -r -l 10 -p -N -F -nH http://www.sitoweb.it
#creare il file Dockerfile
sudo docker build --tag staticimage:1.0 .
docker run --name staticsite -p 80:80 --rm staticimage:1.0
Dockerfile
#x64
#FROM httpd:2.4
#arm Mac M1
FROM arm64v8/httpd
WORKDIR /usr/local/apache2/htdocs/
COPY . /usr/local/apache2/htdocs/