-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (43 loc) · 1.77 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
IMAGE_NAME=sineverba/php56xc
CONTAINER_NAME=php56xc
APP_VERSION=1.8.0-dev
COMPOSER_VERSION=1.10.27
BUILDX_VERSION=0.13.1
BINFMT_VERSION=qemu-v7.0.0-28
build:
docker build \
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
--tag $(IMAGE_NAME):$(APP_VERSION) \
"."
preparemulti:
mkdir -vp ~/.docker/cli-plugins
curl \
-L \
"https://github.com/docker/buildx/releases/download/v$(BUILDX_VERSION)/buildx-v$(BUILDX_VERSION).linux-amd64" \
> \
~/.docker/cli-plugins/docker-buildx
chmod a+x ~/.docker/cli-plugins/docker-buildx
docker buildx version
docker run --rm --privileged tonistiigi/binfmt:$(BINFMT_VERSION) --install all
docker buildx ls
docker buildx rm multiarch
docker buildx create --name multiarch --driver docker-container --use
multi:
docker buildx inspect --bootstrap --builder multiarch
docker buildx build \
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \
--tag $(IMAGE_NAME):$(APP_VERSION) "."
test:
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep 5.6.40
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep OPcache
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep xdebug
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -r "echo phpversion('xdebug');" | grep "2.5.5"
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep pdo_pgsql
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep zip
docker run --rm $(IMAGE_NAME):$(APP_VERSION) /usr/bin/composer -V | grep $(COMPOSER_VERSION)
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -i | grep "short_open_tag => Off => Off"
docker run --rm $(IMAGE_NAME):$(APP_VERSION) php -i | grep "memory_limit => 512M => 512M"
destroy:
docker image rm $(IMAGE_NAME):$(APP_VERSION)
docker image rm php:5.6.40-cli