Public | Automated Build

Last pushed: 2 years ago
Short Description
CentOS 6.6 based Customizable Laravel Dev Container w/ User Auth - 1.093 GB
Full Description

Laravel Auth Container Build

Built from appcontainers/centos66

In order to build the container from scratch, Run the following setup file to configure the environment.

https://raw.githubusercontent.com/appcontainers/laravel/master/dockerup.sh

Save the file, chmod+x the file and run it. Answer the questions and it will build the container automatically

./dockerup.sh

The dockerup.sh file will perform the following actions:

  • Set all environment variables
  • Build the container from the existing image (Build from dockerfile if B selected at press any key promt)
  • Run the container passing in all of the configured variables to the container.
  • Once the container is started, a mysql install script and /tmp/runconfig.sh are executed and apache is set to serve the conf file using passed in ENV variables.

Build container using default values.

docker build -t appcontainers/laravel_auth .

Running the container

The container is built to allow several configurable variables to be passed in at runtime. The values are as follows:

  • APP_NAME - This is the fully qualified domain name such as example.com. This should be passed without any prefix such as www.
  • APACHE_SVRALIAS - This is exactly what it sounds like, the apache file ServerAlias Directive data.
  • MYSQL_SERVER - This is the Host server that runs the MySQL instance where the Application DB will be stored.
  • MYSQL_PASS - This will set the MySQL Root Password.
  • MYSQL_DB - The name of the MySQL DB that the Application will use.
  • APP_USER - The username that the Application will use in order to connect to the MySQL DB.
  • APP_PASS - The password of the user that the Application uses to connect to the MySQL DB.
  • SMB_USER - Username used to connect to the SAMBA shares /home, /var/www/html on the container
  • SMB_PASS - Samba password used to connect to the SAMBA shares /home, /var/www/html on the container

Run the container using default values

docker run -d -it --name laravel -h laravel -P appcontainers/laravel-auth

This will assume the following

  • APP_NAME = laravel.local
  • APACHE_SVRALIAS = www.laravel.local localhost
  • MYSQL_SERVER = localhost
  • MYSQL_PASS = P@ssw0rd
  • MYSQL_DB = laravel
  • APP_USER = admin
  • APP_PASS = P@ssw0rd
  • SMB_USER = samba
  • SMB_PASS = password

Run the container substituting the $varables with your own custom values

docker run -d -it \
--name laravel \
-h laravel \
-p 80:80 \
-p 138:138/udp \
-p 139:139 \
-p 445:445 \
-p 445:445/udp \
-e APP_NAME='testapp.com' \
-e APACHE_SVRALIAS='www.testapp.com localhost' \
-e MYSQL_SERVER='localhost' \
-e MYSQL_PASS='P@ssw0rd' \
-e MYSQL_DB='testapp' \
-e APP_USER='admin' \
-e APP_PASS='P@ssw0rd' \
-e SMB_USER='samba' \
-e SMB_PASS='password' \
appcontainers/laravel_auth

Navigate to the IP address of the server on the port specified (80 default) and log in with admin:password

Connect to the IP address of the server on the default samba ports (138,139,445) via smb (smb://IP.ADD.TO.HOST)

Laravel Authentication:

- User:admin
- Password:password

Samba Authentication:

- User:samba
- Password:password

Container Includes:

- Composer
- Laravel
- Bower
- Twitter Bootstrap, Bootstrap Additions, Bootstrap DateTimePicker
- AngularJS
- Angular-Route, Animate, Cookies, Loader, Resource, Sanatize, Touch, Motion
- Angular-Strap
- Lightbox
- Datatables
- JQuery, JQuery-UI
Docker Pull Command
Owner
appcontainers
Source Repository

Comments (0)