summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/db-init/Dockerfile3
-rw-r--r--build/init/Dockerfile3
-rw-r--r--build/nginx/Dockerfile3
-rw-r--r--build/php/Dockerfile3
-rw-r--r--build/postgres/Dockerfile3
-rw-r--r--build/postgrest/Dockerfile3
-rw-r--r--src/_base.php9
7 files changed, 21 insertions, 6 deletions
diff --git a/build/db-init/Dockerfile b/build/db-init/Dockerfile
index c5a4b59..7bc16ce 100644
--- a/build/db-init/Dockerfile
+++ b/build/db-init/Dockerfile
@@ -15,7 +15,8 @@
###
### You should have received a copy of the GNU General Public License
### along with CRIMSON. If not, see <http://www.gnu.org/licenses/>.
-FROM alpine:latest
+ARG ALPINE_VERSION="3.23"
+FROM alpine:${ALPINE_VERSION}
# install packages
RUN apk add --no-cache postgresql16-client tini shadow sed
diff --git a/build/init/Dockerfile b/build/init/Dockerfile
index cd2af92..176b07f 100644
--- a/build/init/Dockerfile
+++ b/build/init/Dockerfile
@@ -1,4 +1,5 @@
-FROM alpine:latest
+ARG ALPINE_VERSION="3.23"
+FROM alpine:${ALPINE_VERSION}
# install packages
RUN apk add --no-cache tini shadow coreutils findutils
diff --git a/build/nginx/Dockerfile b/build/nginx/Dockerfile
index f74d555..2094d4d 100644
--- a/build/nginx/Dockerfile
+++ b/build/nginx/Dockerfile
@@ -1,4 +1,5 @@
-FROM alpine:latest
+ARG ALPINE_VERSION="3.23"
+FROM alpine:${ALPINE_VERSION}
# install packages
RUN apk add --no-cache nginx shadow curl tini
diff --git a/build/php/Dockerfile b/build/php/Dockerfile
index 5f4bdd5..a1bc31a 100644
--- a/build/php/Dockerfile
+++ b/build/php/Dockerfile
@@ -1,4 +1,5 @@
-FROM php:fpm-alpine
+ARG ALPINE_VERSION="3.23"
+FROM php:fpm-alpine${ALPINE_VERSION}
# install packages
RUN apk add --no-cache postgresql-dev runuser shadow
diff --git a/build/postgres/Dockerfile b/build/postgres/Dockerfile
index 8223800..32d0c7e 100644
--- a/build/postgres/Dockerfile
+++ b/build/postgres/Dockerfile
@@ -1,4 +1,5 @@
-FROM postgres:16-alpine
+ARG ALPINE_VERSION="3.23"
+FROM postgres:16-alpine${ALPINE_VERSION}
# install packages
RUN apk add --no-cache make git shadow
diff --git a/build/postgrest/Dockerfile b/build/postgrest/Dockerfile
index 747052f..eb281d1 100644
--- a/build/postgrest/Dockerfile
+++ b/build/postgrest/Dockerfile
@@ -1,4 +1,5 @@
-FROM alpine:latest
+ARG ALPINE_VERSION="3.23"
+FROM alpine:${ALPINE_VERSION}
# install packages
RUN apk add --no-cache tini wget curl shadow
diff --git a/src/_base.php b/src/_base.php
index d53905d..4124fbf 100644
--- a/src/_base.php
+++ b/src/_base.php
@@ -248,6 +248,15 @@ abstract class Base {
}
}
+ /**
+ * Formats a ISO date
+ * @param $iso_date the ISO date
+ */
+ public function format_date(string $iso_date): string
+ {
+ return date("Y-m-d D H:i", strtotime($iso_date));
+ }
+
// =============================================================== HTTP POST ==
/**