Created
August 6, 2021 18:11
-
-
Save jordanbrauer/1b9a228605514b7f96d8f5a10af8b7ad to your computer and use it in GitHub Desktop.
Earthly PHP Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.0-fpm-alpine | |
WORKDIR /var/www | |
build: | |
COPY index.php . | |
SAVE ARTIFACT index.php /index.php | |
docker: | |
COPY +build/index.php . | |
ENTRYPOINT php /var/www/index.php | |
SAVE IMAGE php-example:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
echo 'hello world'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Earthfile
andindex.php
in some directory on your host;