My last PHP update broke Spress, the static site generator I use for this blog. I decided to move my blog generation to a more stable and portable environment - a Docker container. I’ve documented what I did and what I learned with this blog post. This is my first attempt to do something with Docker, please excuse any bad practices. Running Spress in Docker
My last PHP update broke Spress, the static site generator I use for this blog. I decided to move my blog generation to a more stable and portable environment - a Docker container. I’ve documented what I did and what I learned with this blog post. This is my first attempt to do something with Docker, please excuse any bad practices.
You can find the finished Dockerfile at https://github.com/gbirke/spress-docker.
As the base image I’m using the alpine variant of the official PHP Docker image to keep the storage space for the image as small as possible.
Since the docker container will only run on my local machine and is not intended to be deployed, I don’t bother setting up an extra user account. Everything will be run as
root inside the container.
RUN curl -L -o /usr/local/bin/spress https://github.com/spress/Spress/releases/download/v2.1.3/spress.phar && \ chmod +x /usr/local/bin/spress
The installation of Spress is fairly simple: Download the Spress PHAR file and make it executable. The commands are chained with
&& instead of being individual
RUN commands, because Docker internally creates a new image for every
RUN command and I don’t want to clutter my hard disk with too many intermediary images.
Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub.
Looking to develop a PHP based website from scratch or revamp your existing website? **[HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io")** has always been an industry leader for companies and business owners looking to hire...
Looking to hire affordable yet experienced PHP developers? **[Hire Dedicated PHP Developer](https://hourlydeveloper.io/hire-dedicated-php-developer/ "Hire Dedicated PHP Developer")**, who can convert your idea to reality, within the stipulated...
Docker php Server Example | Create php Server Using Dockerfile
Country state city dropdown using ajax in php. You'll learn how to populate country city state dropdown based on previous selection in php using ajax