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

[9.0.x] GitHub Action must be modified due to docker image in non-root mode #184

Closed
llaville opened this issue Feb 21, 2023 · 5 comments
Closed
Assignees
Labels

Comments

@llaville
Copy link
Collaborator

New Issue

Diagnose

Output of `docker inspect overtrue/phplint:latest` command
[
    {
        "Id": "sha256:5edd28f665559ead2c3178e2215263769290aac26c5b235cf6803a2d8df40804",
        "RepoTags": [
            "overtrue/phplint:latest"
        ],
        "RepoDigests": [
            "overtrue/phplint@sha256:2f7d1d3520957b43eccdbb64d73755103e67c415c6255d772bf22b5997ae3d6a"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2023-02-19T16:38:06.122360861Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "appuser",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev dpkg \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkgconf \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC",
                "PHP_VERSION=8.2.3",
                "PHP_URL=https://www.php.net/distributions/php-8.2.3.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-8.2.3.tar.xz.asc",
                "PHP_SHA256=b9b566686e351125d67568a33291650eb8dfa26614d205d70d82e6e92613d457",
                "COMPOSER_ALLOW_SUPERUSER=1"
            ],
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 102442051,
        "VirtualSize": 102442051,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/f4ef3dbce24f11501175d46db4be157084cfe881d3d739fb9497218d6aac19be/diff:/var/lib/docker/overlay2/53fbe2b318aa473262d1d69ab62b921f356d520b3e76c8f28c688573b284681b/diff:/var/lib/docker/overlay2/ac37daa246f49e06f80c151ef6f599e33e3068623b012e056be6999efcaa0d0b/diff:/var/lib/docker/overlay2/f4cf9a2f37def262e46f8f8dc9b9e34be6386a79bc1c2a74bd76f354519ad4f1/diff:/var/lib/docker/overlay2/7f8efc60673e26dc04a61e9f8c5791646572b7d9a371bc6c7a7dbcc44f0f1ef3/diff:/var/lib/docker/overlay2/a470fb78c31f400fc744977777609d4c13cd734dc34d63a8b98847a14e187272/diff:/var/lib/docker/overlay2/9e35d092617cea99895450fa573859b0cb38e6d55dc73955afec8f784c9aec80/diff:/var/lib/docker/overlay2/8e01785c67b60c8fd44c1394998c945c8f14a87ae4605e09e2084ab651c18bf6/diff:/var/lib/docker/overlay2/d21969d59815ad87f9382ac553e809464279ddcc2badb2f3e794bc991b011d22/diff:/var/lib/docker/overlay2/e29805149048604f3deeb4636640e4ee80c89560e03ffc75bf5940e645dcfd06/diff:/var/lib/docker/overlay2/c9036e4c80efc8b50feb40bcfab55ab5ea3b59ec2ccda5d6528462746e5d017e/diff:/var/lib/docker/overlay2/8d0ff394ab45c687b21ddabf6a0fe34e9e7afd341873e4e55439c0b6dd29b62e/diff:/var/lib/docker/overlay2/ef41c651af8bfedc5004e03221be08e89c1d9084e058b54876c9de59a66de353/diff:/var/lib/docker/overlay2/173993b8ec13f53c9e36d3ae1de0dc2436791d549e2f89c5f2fbe4d7dcefabea/diff",
                "MergedDir": "/var/lib/docker/overlay2/e610cae97aa0dd1665922954ac3e5450311ff8644441a1d16448f251cbc17d4d/merged",
                "UpperDir": "/var/lib/docker/overlay2/e610cae97aa0dd1665922954ac3e5450311ff8644441a1d16448f251cbc17d4d/diff",
                "WorkDir": "/var/lib/docker/overlay2/e610cae97aa0dd1665922954ac3e5450311ff8644441a1d16448f251cbc17d4d/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:7cd52847ad775a5ddc4b58326cf884beee34544296402c6292ed76474c686d39",
                "sha256:77c59b472c8702d20a8f53f58c04b7cf924269c857860e77ecab3a7aec3a2803",
                "sha256:db44c43654189fecca3864a4ab6d80b94f9ab8f52495f03e6096cd7d9c801dfd",
                "sha256:439ab5b1c6c808fd73a29653774032f20a18eb1bf15bb7001ba1449ff8aa3bcb",
                "sha256:ba1ad8405b986007ecd5b25a4f7cbc47775a7a142fbc6c22456a09547de11ac1",
                "sha256:ff8b98f296449d95d546c8a38a77a73492794d604ca4b37e0230f6aa9469bdbe",
                "sha256:fbccf4daf58c5c0b8ad9c54044a8cfbbc71a78d429c30ef6e39116d06b507b12",
                "sha256:a4ee5d3c8cf1a54159383fd3d54aed927155820a1c7c9ea02f7a0b4566661ed0",
                "sha256:b5eb3203e02ac33ac6f68e138988da7a956b28d0deae0cf18919ae0eb70136cc",
                "sha256:84870e48a0c39b4b9313bd076df28c8bd4a5c799e90dbdd59d436cc8e7d11381",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:495246b04a5e33167f2ede3757a4d226255112e21aaf243bc1b3a6f31552b008",
                "sha256:880f74d8533260e30a1f974baae533082e7caf6e8b9ba1aafe550aab7ebb4a47",
                "sha256:a862a911ca7b40334754a3d3a3ad3a8536c15d34ea851c949fb9b05b832df37b",
                "sha256:792f203242ed123df6521a34d2e045fddbab47727d3bd9c0374f77649a4fe93a"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Summary

Could not follow recommendation of https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user with issue #182 fixed

Expected behaviour

GitHub Action working (see use case 1 on project documentation)

Actual behaviour

Workflow fails with docker image re-built by GitHub Action action.yml

@llaville
Copy link
Collaborator Author

If you want to use a GitHub Action that build a Docker image on fly with a specific PHP version, I've a goog new for you !
/cc @mimmi20 about report #181, @ghnp5 about report #180

Teaser with https://github.com/overtrue/phplint/blob/action-v9/.github/workflows/ga.yml

CAUTION I need to fix multiple path linting, but it's run as wanted : see https://github.com/overtrue/phplint/actions/runs/4233023241/jobs/7353455898

@overtrue Do you want to make a review on action-v9 branch before we are able to publish a new release ?

@llaville
Copy link
Collaborator Author

Issue about checking multiple directories was reported at #185

@llaville
Copy link
Collaborator Author

I plan to publish the bugfixes release 9.0.4 tomorrow (with or without new GitHub Action included) !

There is no hurry for this one.

@llaville
Copy link
Collaborator Author

I've received none feedbacks for a reasonable period.
What do I understand. Nobody is interrested by this GitHub Action (new version)

@llaville
Copy link
Collaborator Author

Closing this report due to lack of community feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant