This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the containerization category.
Last Updated: 2024-11-23
I could not get the Project B code running because it used an 8-year old PHP version not available on Mac anymore. Thus I reached for Docker.
I learned the following things:
Dockerfile.
/var/www/html
(typical root of a web server), therefore $ docker-compose
run app composer install
may not work since it may not be in the context of
your actual app. Therefore set WORKDIR
in your Dockerfile
.RUN apt-get update
if you plan on installing ANY apt-get packages. i.e. the container starts with no database of what is available. This saves space.