- Laravel Dockerfile
-
-
Save NdagiStanley/a540d350f58894902f1aeedda7146e8f to your computer and use it in GitHub Desktop.
All the Things PHP
Laravel and Vue:
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 docker.io/bitnami/laravel:6-debian-10 | |
# https://github.com/bitnami/bitnami-docker-laravel/blob/6.18.8-debian-10-r74/6/debian-10/Dockerfile | |
# Set working directory | |
WORKDIR /var/www | |
# Add user for laravel application | |
RUN groupadd -g 1000 www | |
RUN useradd -u 1000 -ms /bin/bash -g www www | |
# Copy composer.lock and composer.json & composer install | |
COPY composer.lock composer.json / | |
RUN composer install | |
# Copy package.json package-lock.json & npm install | |
COPY package.json package-lock.json / | |
RUN npm install | |
# Copy existing application directory contents | |
COPY . /var/www | |
# Copy existing application directory permissions | |
COPY --chown=www:www . /var/www | |
# Change current user to www | |
USER www | |
CMD [ "sh", "server.sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment