Created
September 30, 2020 12:55
-
-
Save owenvoke/77781c86abe0cfb0887c612e40150ebd to your computer and use it in GitHub Desktop.
A Dockerfile for Laravel Zero PHAR distribution
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
# Set the required PHP version | |
FROM php:7.3-cli | |
# Set the name of your application binary | |
ARG APP_NAME=application | |
# Update global packages for the container | |
RUN apt-get update | |
# Install any required PHP extensions | |
# RUN docker-php-ext-install zip | |
# Copy the PHAR build into the container | |
COPY ./builds/$APP_NAME /app/application | |
# Allow the application to be run | |
RUN cd /app && chmod a+x /app/application | |
# Run the app by default | |
ENTRYPOINT ["php", "/app/application"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building your application container
docker build -t [application-name] --build-arg APP_NAME=[application-name] .
Alternatively, you can update the
APP_NAME
argument in the Dockerfile instead.