Skip to content

JoqarSabon/webservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation - Webservices (Docker)

Table of contents

  1. Draft
  2. About this project
  3. Makefile

1. Draft

Hier sollte ein Bild sein



2. About this project

2.1 In this project, 3 Docker services are provided.

  1. PHP Container (More details are explained in the point 2.2)
  2. PHPmyAdmin Container -> Link to Docker Hub -> PHPmyAdmin
  3. MariaDB Container -> Link to Docker Hub -> MariaDB

2.2 How is the PHP image built in Dockerfile?

With the From command we use a base image to set up our own image later on

From php:8.0.18-apache

With the command WORKDIR it should go into the directory /var/www/html

WORKDIR /var/www/html

Now with the copy command it should copy over from the local src folder to the Docker host

COPY ./src/ /var/www/html

With the RUN command it should install updates and software.

RUN apt-get update && apt-get install -y\
  vim
  ...
  ..
  .

3. Makefile

A Makefile is there to tell the make program what to do, for example to start or stop the Docker container.
More details are given in the table.

Important!!! If necessary insert a sudo command before make

Command background execution command Description
make build docker-compose build Build the image
make up docker-compose up -d Build and run the image
make up_attached docker-compose up Bild and run the container, but keep attached
make down docker-compose down Stop the container. Removes attached volumes
make logs docker-compose logs -f Attach to container logs
make restart docker-compose restart Restart the container
make delete docker image prune -a && docker image ls All images will be deleted and after that all images should be listed
make version docker-compose --version; docker --version Show version of Docker-compose and Docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published