Skip to content

Commit bb4d3c1

Browse files
authored
Merge pull request #101 from sineverba/upgrade-dependencies
Upgrade dependencies
2 parents 803dd09 + 92fb811 commit bb4d3c1

File tree

8 files changed

+220
-79
lines changed

8 files changed

+220
-79
lines changed

.circleci/config.yml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
version: 2.1
2+
executors:
3+
arm64_executor:
4+
machine:
5+
image: ubuntu-2204:current
6+
resource_class: arm.large
7+
environment:
8+
DOCKER_IMAGE: php74xc
9+
BINFMT_VERSION: qemu-v7.0.0-28
10+
COMPOSER_VERSION: 1.10.27
11+
XDEBUG_VERSION: 3.1.6
12+
MCRYPT_VERSION: 1.0.7
13+
amd64_executor:
14+
machine:
15+
image: ubuntu-2204:current
16+
resource_class: large
17+
environment:
18+
DOCKER_IMAGE: php74xc
19+
BINFMT_VERSION: qemu-v7.0.0-28
20+
COMPOSER_VERSION: 1.10.27
21+
XDEBUG_VERSION: 3.1.6
22+
MCRYPT_VERSION: 1.0.7
23+
DELETE_TAG_TAG: 1.0.2
24+
jobs:
25+
test:
26+
executor: amd64_executor
27+
steps:
28+
- checkout
29+
- run:
30+
name: "Build image"
31+
command: |
32+
docker build \
33+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
34+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
35+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
36+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:test \
37+
'.'
38+
- run:
39+
name: "Test image"
40+
command: |
41+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -v | grep 7.4.33
42+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -v | grep OPcache
43+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -m | grep xdebug
44+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -r "xdebug_info();" | grep $XDEBUG_VERSION
45+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -m | grep pdo_pgsql
46+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test /usr/bin/composer -V | grep "1.10.27"
47+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -i | grep "short_open_tag => Off => Off"
48+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -i | grep "memory_limit => 512M => 512M"
49+
build_arm64:
50+
executor: arm64_executor
51+
steps:
52+
- checkout
53+
- run:
54+
name: "Login to Docker HUB"
55+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
56+
- run:
57+
name: "Install tonistiigi/binfmt"
58+
command: docker run --rm --privileged tonistiigi/binfmt:$BINFMT_VERSION --install all
59+
- run:
60+
name: "Create buildx multiarch"
61+
command: |
62+
docker buildx create \
63+
--name multiarch \
64+
--use \
65+
&& docker buildx inspect \
66+
--bootstrap \
67+
--builder \
68+
multiarch
69+
- run:
70+
name: "Build image and push to Docker HUB"
71+
command: |
72+
docker buildx build \
73+
--cache-to=type=inline \
74+
--platform linux/arm/v6,linux/arm/v7,linux/arm64 \
75+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
76+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
77+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
78+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:cache-arm \
79+
--push \
80+
'.'
81+
build_amd64:
82+
executor: amd64_executor
83+
steps:
84+
- checkout
85+
- run:
86+
name: "Login to Docker HUB"
87+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
88+
- run:
89+
name: "Install tonistiigi/binfmt"
90+
command: docker run --rm --privileged tonistiigi/binfmt:$BINFMT_VERSION --install all
91+
- run:
92+
name: "Create buildx multiarch"
93+
command: |
94+
docker buildx create \
95+
--name multiarch \
96+
--use \
97+
&& docker buildx inspect \
98+
--bootstrap \
99+
--builder \
100+
multiarch
101+
- run:
102+
name: "Build image and push to Docker HUB"
103+
command: |
104+
docker buildx build \
105+
--cache-from type=registry,ref=$DOCKER_LOGIN/$DOCKER_IMAGE:cache-arm \
106+
--platform linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 \
107+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
108+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
109+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
110+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:$CIRCLE_TAG \
111+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:latest \
112+
--push \
113+
"."
114+
delete_cache_arm:
115+
executor: amd64_executor
116+
steps:
117+
- run:
118+
name: "Login to Docker HUB"
119+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
120+
- run:
121+
name: "Remove cache arm image"
122+
command: |
123+
docker run \
124+
-it \
125+
--rm \
126+
--name $DOCKER_IMAGE \
127+
-e DOCKER_USERNAME=$DOCKER_LOGIN \
128+
-e DOCKER_PASSWORD=$DOCKER_PASSWORD \
129+
-e ORGANIZATION=$DOCKER_LOGIN \
130+
-e IMAGE=$DOCKER_IMAGE \
131+
-e TAG=cache-arm \
132+
$DOCKER_LOGIN/$DOCKER_IMAGE:$DELETE_TAG_TAG
133+
workflows:
134+
test_and_build_images:
135+
jobs:
136+
- test:
137+
filters:
138+
branches:
139+
only:
140+
- master
141+
- develop
142+
- build_arm64:
143+
context: SECRETS
144+
filters:
145+
tags:
146+
only: /.*/
147+
branches:
148+
ignore: /.*/
149+
- build_amd64:
150+
context: SECRETS
151+
filters:
152+
tags:
153+
only: /.*/
154+
branches:
155+
ignore: /.*/
156+
requires:
157+
- build_arm64
158+
- delete_cache_arm:
159+
context: SECRETS
160+
filters:
161+
tags:
162+
only: /.*/
163+
branches:
164+
ignore: /.*/
165+
requires:
166+
- build_amd64
167+

.semaphore/build-deploy.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.semaphore/semaphore.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ global_job_config:
1919
value: sineverba
2020
- name: DOCKER_IMAGE
2121
value: php74xc
22+
- name: COMPOSER_VERSION
23+
value: 1.10.27
24+
- name: XDEBUG_VERSION
25+
value: 3.1.6
26+
- name: MCRYPT_VERSION
27+
value: 1.0.7
2228

2329
blocks:
2430
- name: "Test"
@@ -29,11 +35,17 @@ blocks:
2935
- name: "Build and test"
3036
commands:
3137
- checkout
32-
- docker build --tag $DOCKER_USERNAME/$DOCKER_IMAGE .
38+
- >-
39+
docker build
40+
--tag $DOCKER_USERNAME/$DOCKER_IMAGE
41+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION
42+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION
43+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION
44+
"."
3345
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -v | grep 7.4.33
3446
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -v | grep OPcache
3547
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -m | grep xdebug
36-
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -r "xdebug_info();" | grep "3.1.5"
48+
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -r "xdebug_info();" | grep $XDEBUG_VERSION
3749
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -m | grep pdo_pgsql
3850
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE /usr/bin/composer -V | grep "1.10.27"
3951
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "short_open_tag => Off => Off"

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# 1.10.0
1+
# Next version
2+
+ Upgrade dependencies
3+
4+
## 1.10.0
25
+ Upgrade dependencies
36

47
## 1.9.0

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
ARG COMPOSER_VERSION
2+
FROM composer:$COMPOSER_VERSION AS composer_downloader
13
FROM php:7.4.33-cli
2-
4+
ARG XDEBUG_VERSION
5+
ARG MCRYPT_VERSION
36
# OpCache settings
47
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
58
ENV XDEBUG_MODE="debug,coverage"
@@ -21,14 +24,14 @@ RUN apt-get update -y && apt-get install -y \
2124
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
2225

2326
# Setup PHPXDebug
24-
RUN pecl install xdebug-3.1.5 mcrypt-1.0.5
27+
RUN pecl install xdebug-${XDEBUG_VERSION} mcrypt-${MCRYPT_VERSION}
2528

2629
# Install PHP extensions
2730
RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd opcache zip \
2831
&& docker-php-ext-enable mysqli pdo pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd xdebug mcrypt
2932

3033
# Get latest Composer
31-
COPY --from=composer:1.10.27 /usr/bin/composer /usr/bin/composer
34+
COPY --from=composer_downloader /usr/bin/composer /usr/bin/composer
3235

3336
# Add custom ini files
3437
COPY config/10-shorttag.ini \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2020 - 2023 sineverba
3+
Copyright (c) 2020 - 2024 sineverba
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
IMAGE_NAME=sineverba/php74xc
22
CONTAINER_NAME=php74xc
33
APP_VERSION=1.10.0-dev
4-
BUILDX_VERSION=0.12.0
4+
COMPOSER_VERSION=1.10.27
5+
XDEBUG_VERSION=3.1.6
6+
MCRYPT_VERSION=1.0.7
7+
BUILDX_VERSION=0.13.1
58
BINFMT_VERSION=qemu-v7.0.0-28
69

710
build:
8-
docker build --tag $(IMAGE_NAME):$(APP_VERSION) .
11+
docker build \
12+
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
13+
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \
14+
--build-arg MCRYPT_VERSION=$(MCRYPT_VERSION) \
15+
--tag $(IMAGE_NAME):$(APP_VERSION) \
16+
"."
917

1018
preparemulti:
1119
mkdir -vp ~/.docker/cli-plugins
@@ -24,14 +32,17 @@ preparemulti:
2432
multi:
2533
docker buildx inspect --bootstrap --builder multiarch
2634
docker buildx build \
27-
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \
35+
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 \
36+
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
37+
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \
38+
--build-arg MCRYPT_VERSION=$(MCRYPT_VERSION) \
2839
--tag $(IMAGE_NAME):$(APP_VERSION) "."
2940

3041
test:
3142
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep 7.4.33
3243
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep OPcache
3344
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep xdebug
34-
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -r "xdebug_info();" | grep "3.1.5"
45+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -r "xdebug_info();" | grep $(XDEBUG_VERSION)
3546
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep pdo_pgsql
3647
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep zip
3748
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep mcrypt

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ Do you use it? **Star it!**
2121

2222
| Github / Docker Image tag | PHP Version | Composer version | XDebug | Architectures |
2323
| ------------------------- | ----------- | ---------------- | ------ | ------------- |
24-
| latest | 7.4.33 | 1.10.27 | 3.1.5 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
25-
| 1.10.0 | 7.4.33 | 1.10.27 | 3.1.5 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
26-
| 1.9.0 | 7.4.33 | 1.10.26 | 3.1.5 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
27-
| 1.8.0 | 7.4.33 | 1.10.26 | 3.1.5 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
28-
| 1.7.0 | 7.4.29 | 1.10.26 | 3.1.4 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
29-
| 1.6.0 | 7.4.28 | 1.10.25 | 3.1.3 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
30-
| 1.5.0 | 7.4.22 | 1.10.22 | 3.0.4 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
31-
| 1.4.0 | 7.4.20 | 1.10.22 | 3.0.4 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
32-
| 1.3.0 | 7.4.19 | 1.10.22 | 3.0.4 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
33-
| 1.2.0 | 7.4.16 | 1.10.22 | 3.0.4 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
34-
| 1.1.0 | 7.4.16 | 1.10.21 | 3.0.3 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
35-
| 1.0.1 | 7.4.16 | 1.10.20 | 3.0.3 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
36-
| 1.0.0 | 7.4.16 | 1.10.20 | 3.0.3 | linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
24+
| latest | 7.4.33 | 1.10.27 | 3.1.6 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
25+
| 1.10.0 | 7.4.33 | 1.10.27 | 3.1.5 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
26+
| 1.9.0 | 7.4.33 | 1.10.26 | 3.1.5 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
27+
| 1.8.0 | 7.4.33 | 1.10.26 | 3.1.5 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
28+
| 1.7.0 | 7.4.29 | 1.10.26 | 3.1.4 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
29+
| 1.6.0 | 7.4.28 | 1.10.25 | 3.1.3 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
30+
| 1.5.0 | 7.4.22 | 1.10.22 | 3.0.4 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
31+
| 1.4.0 | 7.4.20 | 1.10.22 | 3.0.4 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
32+
| 1.3.0 | 7.4.19 | 1.10.22 | 3.0.4 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
33+
| 1.2.0 | 7.4.16 | 1.10.22 | 3.0.4 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
34+
| 1.1.0 | 7.4.16 | 1.10.21 | 3.0.3 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
35+
| 1.0.1 | 7.4.16 | 1.10.20 | 3.0.3 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
36+
| 1.0.0 | 7.4.16 | 1.10.20 | 3.0.3 | linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 |
3737

3838

3939
## Xdebug and settings

0 commit comments

Comments
 (0)