Selaa lähdekoodia

Document automated Docker build from git (#5237)

* Document automated Docker build from git
Fix https://github.com/FreshRSS/FreshRSS/issues/5236
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4089

* Rolling
Alexandre Alapetite 3 vuotta sitten
vanhempi
commit
c9d5fe2da1
2 muutettua tiedostoa jossa 18 lisäystä ja 7 poistoa
  1. 12 6
      Docker/README.md
  2. 6 1
      Docker/freshrss/docker-compose.yml

+ 12 - 6
Docker/README.md

@@ -109,15 +109,16 @@ docker rm freshrss_old
 Building your own Docker image is especially relevant for platforms not available on our Docker Hub,
 Building your own Docker image is especially relevant for platforms not available on our Docker Hub,
 which is currently limited to `x64` (Intel, AMD) and `arm32v7`.
 which is currently limited to `x64` (Intel, AMD) and `arm32v7`.
 
 
-```sh
-# First time only
-git clone https://github.com/FreshRSS/FreshRSS.git
+> ℹ️ If you try to run an image for the wrong platform, you might get an error message like *exec format error*.
 
 
-cd FreshRSS/
-git pull --ff-only --prune
-docker build --pull --tag freshrss/freshrss:custom -f Docker/Dockerfile .
+Pick `#latest` (stable release) or `#edge` (rolling release) or a specific release number such as `#1.21.0` like:
+
+```sh
+docker build --pull --tag freshrss/freshrss:latest -f Docker/Dockerfile-Alpine https://github.com/FreshRSS/FreshRSS.git#latest
 ```
 ```
 
 
+> ℹ️ See an automated way to do that in our [Docker Compose](#docker-compose) section, leveraging a [git build context](https://docs.docker.com/build/building/context/#git-repositories).
+
 ## Development mode
 ## Development mode
 
 
 To contribute to FreshRSS development, you can use one of the Docker images to run and serve the PHP code,
 To contribute to FreshRSS development, you can use one of the Docker images to run and serve the PHP code,
@@ -297,6 +298,11 @@ volumes:
 services:
 services:
   freshrss:
   freshrss:
     image: freshrss/freshrss:edge
     image: freshrss/freshrss:edge
+    # Optional build section if you want to build the image locally:
+    build:
+      # Pick #latest (stable release) or #edge (rolling release) or a specific release like #1.21.0
+      context: https://github.com/FreshRSS/FreshRSS.git#edge
+      dockerfile: Docker/Dockerfile-Alpine
     container_name: freshrss
     container_name: freshrss
     restart: unless-stopped
     restart: unless-stopped
     logging:
     logging:

+ 6 - 1
Docker/freshrss/docker-compose.yml

@@ -7,7 +7,12 @@ volumes:
 services:
 services:
 
 
   freshrss:
   freshrss:
-    image: freshrss/freshrss
+    image: freshrss/freshrss:latest
+    # Optional build section if you want to build the image locally:
+    build:
+      # Pick #latest (stable release) or #edge (rolling release) or a specific release like #1.21.0
+      context: https://github.com/FreshRSS/FreshRSS.git#latest
+      dockerfile: Docker/Dockerfile-Alpine
     container_name: freshrss
     container_name: freshrss
     hostname: freshrss
     hostname: freshrss
     restart: unless-stopped
     restart: unless-stopped