This is a Dockerfile to build XAMPP based on ubuntu:16.04.
First, using command git clone to clone this project.
$ git clone https://github.com/fasiahmed/teamcalendar.git
Using (SSH) $ git clone [email protected]:fasiahmed/teamcalendar.git
Second, buildng XAMPP image form Dockerfile, you can use tag -t to name this image.
$ docker build -t xampp/fullcalender .
[using Docker hub]:
Pull this image from Docker Hub.
$ docker pull fasi/fullcalender
Run the docker container.
$ docker run -d -p 80:80 -p 443:443 -p 3306:3306 fasi/fullcalender
[using the Dockerfile]
docker run to run , and use tag -v to mount on your folder, tag -p can forward the port 80 (HTTP) , 443 (HTTPS) , and 3306 (MariaDB/MySQL) .The path /opt/lampp/htdocs is the web root directory , mount it so you can edit your website easily.
$ docker run -d -v /to/your/path:/opt/lampp/htdocs -p 80:80 -p 443:443 -p 3306:3306 XAMPP/fullcalender
or you can directly run the below command where all the required calendar files are shared in this image
The path /opt/lampp/htdocs is the web root directory , mount it, let you edit the website easily.
Usig the command docker exec -it fasi/fullcalender bash to run bash in the live container, and you can use command mysql, php... without cd /opt/lampp/bin , the path has been added in /root/.bashrc.
http://localhost/NexintoCalendar/teamCalendar.html
[update the password]:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root'; FLUSH PRIVILEGES;
[login into the database]:
mysql -uroot -p
password: password
[Use the test database]: use test;
[create the tables]:
create table employee (
empName varchar(30),
empID int(4) not null,
primary key (empID)
);
MariaDB [test]> desc employee;
+---------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-----------------+------+-----+---------+-------+
| empName | varchar(30) | YES | | NULL | |
| empID | int(3) unsigned | NO | PRI | NULL | |
+---------+-----------------+------+-----+---------+-------
create table empEvents (
empName varchar(30),
title varchar(30),
start date,
end date,
Description varchar(30),
empID int(3),
noHours int(4),
foreign key (empID) references employee(empID)
);
MariaDB [test]> desc empEvents;
+-------------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-----------------+------+-----+---------+-------+
| empName | varchar(30) | YES | | NULL | |
| title | varchar(30) | YES | | NULL | |
| start | date | YES | | NULL | |
| end | date | YES | | NULL | |
| Description | varchar(30) | YES | | NULL | |
| empID | int(3) unsigned | NO | MUL | 0 | |
| noHours | int(4) | YES | | NULL | |
+-------------+-----------------+------+-----+---------+-------+
$ docker exec -it /bin/bash $ /opt/lampp/ctlscript.sh start ( This will start the mysql, httpd and php if they have not started properly )
[ Add an Event]
[ Delete an Event]
[ Modify an Event or Resize the event ]
[ Display the Holidays in the calendar ]
Content type
Image
Digest
Size
543.1 MB
Last updated
over 8 years ago
docker pull fasi/fullcalender