Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion 8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM --platform=$BUILDPLATFORM alpine:3.19 AS main

LABEL maintainer="Jorge Arco <jorge.arcoma@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF

LABEL org.opencontainers.image.authors="Jorge Arco <jorge.arcoma@gmail.com>" \
org.opencontainers.image.source="https://github.com/jorge07/alpine-php" \
org.opencontainers.image.title="jorge07/alpine-php" \
org.opencontainers.image.description="Lightweight PHP-FPM Docker images based on Alpine Linux" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/jorge07/alpine-php" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"

RUN apk --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main add \
icu-libs \
Expand Down
12 changes: 11 additions & 1 deletion 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM --platform=$BUILDPLATFORM alpine:3.21 AS main

LABEL maintainer="Jorge Arco <jorge.arcoma@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF

LABEL org.opencontainers.image.authors="Jorge Arco <jorge.arcoma@gmail.com>" \
org.opencontainers.image.source="https://github.com/jorge07/alpine-php" \
org.opencontainers.image.title="jorge07/alpine-php" \
org.opencontainers.image.description="Lightweight PHP-FPM Docker images based on Alpine Linux" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/jorge07/alpine-php" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"

RUN apk --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.21/main add \
icu-libs \
Expand Down
12 changes: 11 additions & 1 deletion 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM --platform=$BUILDPLATFORM alpine:3.20 AS main

LABEL maintainer="Jorge Arco <jorge.arcoma@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF

LABEL org.opencontainers.image.authors="Jorge Arco <jorge.arcoma@gmail.com>" \
org.opencontainers.image.source="https://github.com/jorge07/alpine-php" \
org.opencontainers.image.title="jorge07/alpine-php" \
org.opencontainers.image.description="Lightweight PHP-FPM Docker images based on Alpine Linux" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/jorge07/alpine-php" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"

RUN apk --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.20/main add \
icu-libs \
Expand Down
12 changes: 11 additions & 1 deletion 8.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
# TODO: pin to alpine:3.22 (or next stable) once available.
FROM --platform=$BUILDPLATFORM alpine:edge AS main

LABEL maintainer="Jorge Arco <jorge.arcoma@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF

LABEL org.opencontainers.image.authors="Jorge Arco <jorge.arcoma@gmail.com>" \
org.opencontainers.image.source="https://github.com/jorge07/alpine-php" \
org.opencontainers.image.title="jorge07/alpine-php" \
org.opencontainers.image.description="Lightweight PHP-FPM Docker images based on Alpine Linux" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/jorge07/alpine-php" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"

RUN apk --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/main add \
icu-libs \
Expand Down
15 changes: 9 additions & 6 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ REPO:=jorge07/alpine-php
DOCKER_RUN:=docker run --rm -v $(PWD):/app ${REPO}:${VERSION}
DOCKER_RUN_DEV:=$(DOCKER_RUN)-dev
ARCHS?=linux/amd64
BUILD_DATE?=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
VCS_REF?=$(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
OCI_LABELS=--build-arg BUILD_DATE=$(BUILD_DATE) --build-arg VCS_REF=$(VCS_REF)

build:
docker buildx build --load --platform linux/amd64 -t $(REPO):${VERSION} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --load --platform linux/amd64 -t $(REPO):${VERSION}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --load --platform linux/amd64 $(OCI_LABELS) -t $(REPO):${VERSION} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --load --platform linux/amd64 $(OCI_LABELS) -t $(REPO):${VERSION}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/

run-detached:
docker run --name php${VERSION} -d -v $(PWD):/app $(REPO):${VERSION}
Expand All @@ -30,10 +33,10 @@ release: build
echo "Releasing: ${REPO}:${VERSION}"
echo "Releasing: ${REPO}:${VERSION}-dev"
$(eval export SEMVER=$(shell docker run --rm -v $(PWD):/app ${REPO}:${VERSION} php -r "echo phpversion();"))
docker buildx build --platform $(ARCHS) --push -t $(REPO):${VERSION} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push -t $(REPO):${VERSION}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push -t $(REPO):${SEMVER} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push -t $(REPO):${SEMVER}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push $(OCI_LABELS) -t $(REPO):${VERSION} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push $(OCI_LABELS) -t $(REPO):${VERSION}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push $(OCI_LABELS) -t $(REPO):${SEMVER} --target main -f ${VERSION}/Dockerfile ${VERSION}/
docker buildx build --platform $(ARCHS) --push $(OCI_LABELS) -t $(REPO):${SEMVER}-dev --target dev -f ${VERSION}/Dockerfile ${VERSION}/

test-all:
VERSION=8.3 $(MAKE) build
Expand Down
Loading