Skip to content

siddhantfriends/docker-dev-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web-developer workspace on Docker!

The docker image contains LEMP stack (Linux Nginx MySQL Php) with node and composer which is suitable for web development. Note that the container contains PHP version 5.6.

Installation

Clone the repository.

user@domain:~$ git clone https://github.com/siddhantfriends/docker-dev-workspace.git

Place your project files in repository/ directory. Configure virtual hosts by adding Nginx configuration file to nginx-conf/ directory. and run the container using

user@domain:~$ cd docker-dev-workspace
user@domain:~/docker-dev-workspace$ docker-compose up -d --build workspace

Once the container is running, you can enter the container using

user@domain:~/docker-dev-workspace$ docker exec -it workspace bash

Update your host file to add virtual hosts - C:\Windows\System32\drivers\etc\hosts on Windows - /etc/hosts on Linux/Mac - 127.0.0.1 {server_name} as defined in the nginx-config files. You will need to add all the {server_name} defined in each config file.

Test the URLs in the browser!! http://localhost

Exit the container using

user@domain:~/docker-dev-workspace$ docker-compose down

Directory info

Project Directory Container Directory Description
repository/ /var/www/html/ Use this directory for storing project files.
nginx-config/ /var/nginx/sites-available/
/var/nginx/sites-enabled
Configure virtual hosts by adding Nginx configuration files. A sample file is provided at nginx-config/default.