aboutsummaryrefslogtreecommitdiff
path: root/Docker/hooks
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-07-07 20:07:01 +0200
committerGravatar GitHub <noreply@github.com> 2019-07-07 20:07:01 +0200
commit8c2cf1b4dd3a6c79d77f9dc1a256e9d4a8db6a68 (patch)
treec8b81ad0d7dfff999c48c67d78685c8a55d0c43b /Docker/hooks
parentdcb090dcd779581c1eddb20b4860848b02139145 (diff)
Docker healthcheck+ labels (#2438)
* Add Docker labels And try to fix the platform metadata for ARM, and add health check * Execution rights * Remove experimental features not supported by Docker Hub "--squash" is only supported on a Docker daemon with experimental features enabled. build hook failed! (1) * Fix paths
Diffstat (limited to 'Docker/hooks')
-rwxr-xr-xDocker/hooks/build22
-rwxr-xr-xDocker/hooks/pre_build4
2 files changed, 25 insertions, 1 deletions
diff --git a/Docker/hooks/build b/Docker/hooks/build
new file mode 100755
index 000000000..73bc90e74
--- /dev/null
+++ b/Docker/hooks/build
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cd ..
+FRESHRSS_VERSION=`grep "'FRESHRSS_VERSION'" constants.php | cut -d "'" -f4`
+echo "$FRESHRSS_VERSION"
+
+if [[ "$DOCKERFILE_PATH" == *-ARM ]]
+then
+ #TODO: Add --squash --platform arm options when Docker Hub deamon supports them
+ docker build \
+ --build-arg FRESHRSS_VERSION="$FRESHRSS_VERSION" \
+ --build-arg SOURCE_BRANCH="$SOURCE_BRANCH" \
+ --build-arg SOURCE_COMMIT="$SOURCE_COMMIT" \
+ -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" .
+else
+ #TODO: Add --squash option when Docker Hub deamon supports it
+ docker build \
+ --build-arg FRESHRSS_VERSION="$FRESHRSS_VERSION" \
+ --build-arg SOURCE_BRANCH="$SOURCE_BRANCH" \
+ --build-arg SOURCE_COMMIT="$SOURCE_COMMIT" \
+ -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" .
+fi
diff --git a/Docker/hooks/pre_build b/Docker/hooks/pre_build
index f6c8211c0..32074059c 100755
--- a/Docker/hooks/pre_build
+++ b/Docker/hooks/pre_build
@@ -1,6 +1,8 @@
#!/bin/bash
-if [[ "$DOCKERFILE_PATH" == *-ARM ]];
+cp README.md ../
+
+if [[ "$DOCKERFILE_PATH" == *-ARM ]]
then
# https://github.com/balena-io/qemu
# Download a local copy of QEMU on Docker Hub build machine