Skip to content

Commit 9632221

Browse files
committed
Minor tweaks
1 parent f37a5dd commit 9632221

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

hooks/build

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
PHP_TAGS=$(curl 'https://registry.hub.docker.com/v2/repositories/library/php/tags?page_size=1024' | grep -Po "[0-9]+\.[0-9]+\.[0-9]+-apache" | sed 's/-apache//' | sort | uniq)
66

77
if [ $DOCKER_TAG == "latest" ]; then
8+
89
docker build -f $DOCKERFILE_PATH -t ${IMAGE_NAME} .
910

1011
for PHP_MAJOR in $(echo "$PHP_TAGS" | grep -Po "^[0-9]+" | sort | uniq); do
@@ -19,16 +20,13 @@ if [ $DOCKER_TAG == "latest" ]; then
1920

2021
for PHP_VERSION in $(echo "$PHP_TAGS"); do
2122
echo "##### Build $PHP_VERSION (x.y.z) #####"
22-
docker build --build-arg PHP_VERSION_TAG=${PHP_VERSION}-apache -f ${DOCKERFILE_PATH} -t ${DOCKER_REPO}:${PHP_VERSION} .
23+
docker build --build-arg PHP_VERSION_TAG=${PHP_VERSION}-apache -f ${DOCKERFILE_PATH} -t ${DOCKER_REPO}:${PHP_VERSION}-latest .
2324
done
2425

25-
#docker build --build-arg PHP_VERSION_TAG=7.1-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.1-latest .
26-
#docker build --build-arg PHP_VERSION_TAG=7.2-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.2-latest .
27-
#docker build --build-arg PHP_VERSION_TAG=7.3-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.3-latest .
28-
#docker build --build-arg PHP_VERSION_TAG=7.4-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.4-latest .
2926
else
27+
3028
# I think we kind of have to build that default ~UI~ box. Naming it x-*
31-
docker build --build-arg PHP_VERSION_TAG=apache -f ${DOCKERFILE_PATH} -t ${DOCKER_REPO}:x-${DOCKER_TAG} .
29+
docker build --build-arg PHP_VERSION_TAG=apache -f ${DOCKERFILE_PATH} -t ${DOCKER_REPO}:${DOCKER_TAG} .
3230

3331
for PHP_MAJOR in $(echo "$PHP_TAGS" | grep -Po "^[0-9]+" | sort | uniq); do
3432
echo "##### Build ${PHP_MAJOR}-${DOCKER_TAG} (phpVersion-basePhpApacheVersion) #####"
@@ -45,8 +43,4 @@ else
4543
docker build --build-arg PHP_VERSION_TAG=${PHP_VERSION}-apache -f ${DOCKERFILE_PATH} -t ${DOCKER_REPO}:${PHP_VERSION}-${DOCKER_TAG} .
4644
done
4745

48-
#docker build --build-arg PHP_VERSION_TAG=7.1-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.1-$DOCKER_TAG .
49-
#docker build --build-arg PHP_VERSION_TAG=7.2-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.2-$DOCKER_TAG .
50-
#docker build --build-arg PHP_VERSION_TAG=7.3-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.3-$DOCKER_TAG .
51-
#docker build --build-arg PHP_VERSION_TAG=7.4-apache -f $DOCKERFILE_PATH -t $DOCKER_REPO:7.4-$DOCKER_TAG .
5246
fi

hooks/post_push

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ if [ $DOCKER_TAG == "latest" ]; then
1818

1919
for PHP_VERSION in $(echo "$PHP_TAGS"); do
2020
echo "##### Push $PHP_VERSION (x.y.z) #####"
21-
docker push ${DOCKER_REPO}:${PHP_VERSION}
21+
docker push ${DOCKER_REPO}:${PHP_VERSION}-latest
2222
done
2323

24-
#docker push $DOCKER_REPO:7.1-latest
25-
#docker push $DOCKER_REPO:7.2-latest
26-
#docker push $DOCKER_REPO:7.3-latest
27-
#docker push $DOCKER_REPO:7.4-latest
2824
else
2925

3026
for PHP_MAJOR in $(echo "$PHP_TAGS" | grep -Po "^[0-9]+" | sort | uniq); do
@@ -42,8 +38,4 @@ else
4238
docker push ${DOCKER_REPO}:${PHP_VERSION}-${DOCKER_TAG}
4339
done
4440

45-
#docker push $DOCKER_REPO:7.1-$DOCKER_TAG
46-
#docker push $DOCKER_REPO:7.2-$DOCKER_TAG
47-
#docker push $DOCKER_REPO:7.3-$DOCKER_TAG
48-
#docker push $DOCKER_REPO:7.4-$DOCKER_TAG
4941
fi

0 commit comments

Comments
 (0)