Skip to content

Instantly share code, notes, and snippets.

@gjreasoner
Created November 30, 2016 05:00
Show Gist options
  • Save gjreasoner/941fd30b72e970e9ce8ae474e9d9565a to your computer and use it in GitHub Desktop.
Save gjreasoner/941fd30b72e970e9ce8ae474e9d9565a to your computer and use it in GitHub Desktop.
Temporary/Lightweight Laravel Dockerfile

The docker image 112MB with the default laravel installation.

For development run something like

docker run -d -p 8090:8090 -v ~/apps/laravel-project:/app laravel-docker

And open http://localhost:8090 in your browser.

To deploy run

docker build -t "laravel-docker" .

To add all your files to the image and have the image ready to go or use something like http://zeit.co/now and type now --docker

FROM alpine:latest
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk add --update \
curl \
php7 \
php7-opcache \
php7-openssl \
php7-pdo \
php7-json \
php7-phar \
php7-dom \
php7-mbstring \
php7-session \
php7-ctype \
&& rm -rf /var/cache/apk/*
RUN mv /usr/bin/php7 /usr/bin/php
COPY . /app
WORKDIR /app/public
EXPOSE 8090
CMD ["php","-S","0.0.0.0:8090"]
@smoochpapa
Copy link

Pls I want to build a social network with lavarel socialite I need help, any attention at all I will be glad

@gjreasoner
Copy link
Author

@smoochpapa socialite is a authentication method, so you want to build a social network using socialite as an authentication method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment