diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e29e24..ddcc198 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,13 +35,15 @@ Although it's possible to build packages without `dockerd` running, using [`buil ### Building the docker image locally 1. Start the docker daemon if it's not already started: `sudo dockerd` -2. Run the build command: `docker buildx build -t galette-local .` +2. Run the build command: `docker buildx build --platform linux/amd64 -t galette-local --load .` + * replace the platform (`linux/amd64`) if you're building on another platform * replace `galette-local` with any name you would like to give your local image + * `--load` loads the image into your local docker, so you can use it as a container image. ### Building for multiple architecures locally 1. Start the docker daemon if it's not already started: `sudo dockerd` 2. Create a builder-image `docker buildx create --name mybuilder --use --bootstrap` (see "Building with Buildx" [here](https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx/) for more details) -3. Run the build command: `docker buildx build --platform linux/amd64,linux/arm64 -t galette-local .` +3. Run the build command: `docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t galette-local .` * replace `galette-local` with any name you would like to give your local image * NOTE: The build process is significantly longer than just building for your local architecture. diff --git a/Dockerfile b/Dockerfile index ada973b..9e8ebe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL maintainer="GrasDK" # @author GrasDK LABEL phpversion="8.2" -ARG galetteversion="1.0.3" +ARG galetteversion="1.0.4" ## Plugins versions ARG plugin_auto_version="2.0.0" diff --git a/README.md b/README.md index 27959a0..62e4a6c 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,15 @@ If you want to contribute to containerized galette, take a look [here](./CONTRIB * only webroot is exposed via Apache DocumentRoot and vhost * you can use reverse proxy to access Galette by domain or subdomain +## Prerequisites +This docker image has no included database, so you need to have that separately. Since you probably already are running docker, take a look [here](https://mariadb.com/kb/en/installing-and-using-mariadb-via-docker/#creating-a-container) for a guide on how to run MariaDB in a container. + ## How to use this image using docker command line Galette has a really nice installer, that runs you through database setup and initial admin user creation. The installer creates a configuration files, which you will be interested in keeping on a volume outside the docker image, for reuse when you upgrade to a newer version. Therefore it is really important that you follow this guide exactly. -If you are upgrading from an ealier version, you can skip the first step below. +If you are upgrading from an ealier version, you can skip the first two steps below. 1. Create an empty file `config.inc.php` which you will mount as a volume in the next step. - It is important that you create this file. You can also take a copy of [this](.example/config/config.inc.php), as the contents do not matter diff --git a/galette-with-db.Dockerfile b/galette-with-db.Dockerfile deleted file mode 100644 index 08a86a0..0000000 --- a/galette-with-db.Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Using PHP-Apache image -FROM galette/galette:1.0.2 -USER root -RUN apt-get -y update \ - && apt-get install --no-install-recommends -y \ - mariadb-server=1:10.11* \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -ENV MYSQL_ROOT_PASSWORD=myrootpassword -ENV MYSQL_DATABASE=galette -ENV MYSQL_USER=galette -ENV MYSQL_PASSWORD=galette_pass -ENV MYSQL_PORT=3306 -RUN mkdir /run/mysqld/ -USER mysql:mysql -CMD ["mysqld_safe"] -USER www-data:www-data