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.
Save the file, chmod+x the file and run it. Answer the questions and it will build the container automatically
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)
- User:admin - Password:password
- User:samba - Password:password
- 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