-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLayerfile
27 lines (22 loc) · 1022 Bytes
/
Layerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Use an Ubuntu 18.04 base for our staging server
FROM vm/ubuntu:18.04
# To note: Layerfiles create entire VMs, *not* containers!
# Install php5 & composer
RUN yes | sudo add-apt-repository ppa:ondrej/php && sudo apt-get update
RUN apt-get update && \
apt-get install software-properties-common && \
yes | add-apt-repository ppa:ondrej/php && \
apt-get update && \
sudo apt-get install -y curl php php-mbstring php-zip php-dom \
git unzip
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
rm composer-setup.php
# Install laravel
ENV COMPOSER_ALLOW_SUPERUSER=1 PATH=~/.config/composer/vendor/bin:$PATH
RUN composer create-project --prefer-dist laravel/laravel blog
WORKDIR blog
RUN composer install
RUN BACKGROUND /usr/bin/php artisan serve --host 0.0.0.0 --port 80
# Expose website creates a unique link to view the website running in the server
EXPOSE WEBSITE http://localhost:80