Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker images #1418

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 0 additions & 8 deletions .docker/Dockerfile

This file was deleted.

8 changes: 2 additions & 6 deletions .docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ set -euf -o pipefail

readonly SCRIPT_DIR=$(dirname $(realpath "${BASH_SOURCE:-$0}"))

if [[ "$(docker images -q ghcr.io/box-project/box_php725 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php725 --file "${SCRIPT_DIR}/php725" .
fi

if [[ "$(docker images -q ghcr.io/box-project/box_php82 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82 --file "${SCRIPT_DIR}/php82" .
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82 --file "${SCRIPT_DIR}/php82.dockerfile" .
fi

if [[ "$(docker images -q ghcr.io/box-project/box_php82_xdebug 2> /dev/null)" == "" ]]; then
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82_xdebug --file "${SCRIPT_DIR}/php82_xdebug" .
docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php82_xdebug --file "${SCRIPT_DIR}/php82_xdebug.dockerfile" .
fi
14 changes: 14 additions & 0 deletions .docker/dockerhub.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM --platform=linux/amd64 php:8.2-cli-alpine

Check warning on line 1 in .docker/dockerhub.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# hadolint ignore=DL3022
COPY --chmod=755 --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter

# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

COPY --chmod=755 bin/box.phar /box.phar

RUN mkdir -p /local
WORKDIR /local
ENTRYPOINT ["/box.phar"]
1 change: 0 additions & 1 deletion .docker/php725

This file was deleted.

7 changes: 0 additions & 7 deletions .docker/php82

This file was deleted.

25 changes: 25 additions & 0 deletions .docker/php82.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM --platform=linux/amd64 php:8.2-cli-alpine AS build-stage

Check warning on line 1 in .docker/php82.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.2

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apk add --update make git

# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /opt/box-project/box
WORKDIR /opt/box-project/box
ADD . /opt/box-project/box
RUN make compile

FROM --platform=linux/amd64 php:8.2-cli-alpine

Check warning on line 13 in .docker/php82.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.2

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# hadolint ignore=DL3022
COPY --chmod=755 --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter intl

COPY --chmod=755 --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box
# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /local
WORKDIR /local
ENTRYPOINT ["/usr/bin/box"]
19 changes: 0 additions & 19 deletions .docker/php82_build_phar

This file was deleted.

9 changes: 0 additions & 9 deletions .docker/php82_xdebug

This file was deleted.

25 changes: 25 additions & 0 deletions .docker/php82_xdebug.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM --platform=linux/amd64 php:8.2-cli-alpine as build-stage

Check warning on line 1 in .docker/php82_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.2 (Xdebug)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in .docker/php82_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.2 (Xdebug)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apk add --update make git

# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /opt/box-project/box
WORKDIR /opt/box-project/box
ADD . /opt/box-project/box
RUN make compile

FROM --platform=linux/amd64 php:8.2-cli-alpine

Check warning on line 13 in .docker/php82_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.2 (Xdebug)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# hadolint ignore=DL3022
COPY --chmod=755 --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter intl xdebug

COPY --chmod=755 --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box
# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /local
WORKDIR /local
ENTRYPOINT ["/usr/bin/box"]
25 changes: 25 additions & 0 deletions .docker/php83.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM --platform=linux/amd64 php:8.3-cli-alpine AS build-stage

Check warning on line 1 in .docker/php83.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.3

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apk add --update make git

# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /opt/box-project/box
WORKDIR /opt/box-project/box
ADD . /opt/box-project/box
RUN make compile

FROM --platform=linux/amd64 php:8.3-cli-alpine

Check warning on line 13 in .docker/php83.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.3

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# hadolint ignore=DL3022
COPY --chmod=755 --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter intl

COPY --chmod=755 --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box
# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /local
WORKDIR /local
ENTRYPOINT ["/usr/bin/box"]
25 changes: 25 additions & 0 deletions .docker/php83_xdebug.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM --platform=linux/amd64 php:8.3-cli-alpine as build-stage

Check warning on line 1 in .docker/php83_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.3 (Xdebug)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in .docker/php83_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.3 (Xdebug)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apk add --update make git

# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /opt/box-project/box
WORKDIR /opt/box-project/box
ADD . /opt/box-project/box
RUN make compile

FROM --platform=linux/amd64 php:8.3-cli-alpine

Check warning on line 13 in .docker/php83_xdebug.dockerfile

View workflow job for this annotation

GitHub Actions / Publish the Docker image PHP 8.3 (Xdebug)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# hadolint ignore=DL3022
COPY --chmod=755 --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zlib phar sodium tokenizer filter intl xdebug

COPY --chmod=755 --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box
# hadolint ignore=DL3022
COPY --chmod=755 --from=composer/composer:2-bin /composer /usr/bin/composer

RUN mkdir -p /local
WORKDIR /local
ENTRYPOINT ["/usr/bin/box"]
13 changes: 8 additions & 5 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
fail-fast: false
matrix:
include:
- name: PHP 7.2.5
docker-file: .docker/php725
image-tag: ghcr.io/box-project/box_php725
- name: PHP 8.2
docker-file: .docker/php82
docker-file: .docker/php82.dockerfile
image-tag: ghcr.io/box-project/box_php82
- name: PHP 8.2 (Xdebug)
docker-file: .docker/php82_xdebug
docker-file: .docker/php82_xdebug.dockerfile
image-tag: ghcr.io/box-project/box_php82_xdebug
- name: PHP 8.3
docker-file: .docker/php83.dockerfile
image-tag: ghcr.io/box-project/box_php83
- name: PHP 8.3 (Xdebug)
docker-file: .docker/php83_xdebug.dockerfile
image-tag: ghcr.io/box-project/box_php83_xdebug
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

env:
DOCKERFILE: .docker/Dockerfile
DOCKERFILE: .docker/dockerhub.dockerfile
DOCKERHUB_USERNAME: boxproject
TERM: xterm

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/requirement-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,21 @@ jobs:
matrix:
e2e:
- command: _test_e2e_pass_no_config_min_composer_php
docker-image: ghcr.io/box-project/box_php725
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_pass_no_config_min_box_php
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_pass_complete_min_composer_php
docker-image: ghcr.io/box-project/box_php725
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_pass_complete_min_box_php
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_fail_complete_min_composer_php
docker-image: ghcr.io/box-project/box_php725
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_fail_complete_min_box_php
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_skip_min_composer_php
docker-image: ghcr.io/box-project/box_php725
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_pass_complete_requirement_checker_not_disabled
docker-image: ghcr.io/box-project/box_php725
docker-image: ghcr.io/box-project/box_php82
- command: _test_e2e_fail_conflict
docker-image: ghcr.io/box-project/box_php82
steps:
Expand Down
Loading