Sign inSign up

jhoncytech/buster-nginx

By jhoncytech

•Updated over 5 years ago

Image for development with a simple basic structure

Image
0

1.1K

jhoncytech/buster-nginx repository overview

Header Logo

⁠Quick reference

  • Maintained by: Jhoncy Tech - JhonnyGO
⁠Pull command

$ docker pull jhoncytech/buster-nginx:b4

⁠Features

This image will help you start any development project with a base structure.
With this structure you get:

⁠Tools, software and packages used
  • Debian 10 -Buster
  • Nginx
  • PHP 7.3
  • Bootstrap 4
  • Node - npm cli
  • Composer
  • AWS - cli
  • Kubectl
  • Minikube

⁠How to use this image.

⁠Create a Dockerfile in your project

NOTE: use tag depending on bootstrap you need

FROM jhoncytech/buster-nginx:b4

COPY ./public-html/ /var/www/html/

CMD ["nginx", "-g", "daemon off;"]

Then, run the commands to build and run the Docker image:

$ docker build -t my-web .
$ docker run -dit --name my-web-app -p 8080:80 my-web

Visit http://localhost:8080⁠ and you will see It works!

⁠Without a Dockerfile

If you don't want to include a Dockerfile in your project, it is sufficient to do the following:

CONTAINER WITH LINUX OS
$ docker run -dit --name my-web-app -p 8080:80 -v "$PWD":/var/www/html/ jhoncytech/buster-nginx:b4
CONTAINER WITH WINDOWS OS
$ docker run -dit --name my-web-app -p 8080:80 -v C:\absolute\path\to\your\windows\folder:/var/www/html/ jhoncytech/buster-nginx:b4
⁠Docker Compose

FILE MYSQL.ENV


MYSQL_ROOT_PASSWORD=123456
MYSQL_DATABASE=jhoncytech
MYSQL_USER=myuser
MYSQL_PASSWORD=654321

FILE DOCKER-COMPOSE


version: '3.9'

########## SERVICES
services:

	########## MYSQL CONTAINER
	jt-mysql:
		container_name: my-mysql
		image: mysql:5.7
		restart: always
		ports:
			- 3306:3306
		env_file: mysql.env
		volumes:
			- ./volumes/mysql:/var/lib/mysql
		networks:
			- jhoncytech

	########## NGINX CONTAINER
	jt-nginx:
		container_name: my-nginx
		image: jhoncytech/buster-nginx:b4
		restart: always
		ports:
			- 8080:80
		volumes:
			- ./volumes/web-project:/var/www/html
		depends_on:
			- jt-mysql
		networks:
			- jhoncytech


networks:
	- jhoncytech
⁠Directory structure.

Just to recap, we create a directory on our local machine called python-docker, then inside the folder we create the docker-compose and mysql.env file as shown.


nginx-docker
|____ docker-compose
|____ mysql.env

finally we execute the command:

$ docker-compose up -d

⁠Image Variants.

The images come in many flavors, each designed for a specific use case.

  • b4: Image with bootstrap 4
  • b5: Image with bootstrap 5
  • latest: Image with bootstrap 5

jhoncytech/buster-nginx:TAG

⁠Example => Image with Bootstrap 4

jhoncytech/buster-nginx:b4

⁠Contacts

- Mail: [email protected]
- Web: https://jhoncytech.com
---
- Mail: [email protected]
- Web: https://jhonnygo.com
Header Logo

Tag summary

Content type

Image

Digest

Size

396.8 MB

Last updated

over 5 years ago

docker pull jhoncytech/buster-nginx