Image for development with a simple basic structure
1.1K
$ docker pull jhoncytech/buster-nginx:b4
This image will help you start any development project with a base structure.
With this structure you get:
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!
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
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
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
The images come in many flavors, each designed for a specific use case.
jhoncytech/buster-nginx:TAG
jhoncytech/buster-nginx:b4
- Mail: [email protected]
- Web: https://jhoncytech.com
---
- Mail: [email protected]
- Web: https://jhonnygo.com

Content type
Image
Digest
Size
396.8 MB
Last updated
over 5 years ago
docker pull jhoncytech/buster-nginx