waglpz/docker

Some Dockerfiles

Maintainers

Details

github.com/waglpz/docker

Source

Issues

Installs: 62

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Language:Dockerfile

v1.0.0 2023-04-18 11:41 UTC

This package is auto-updated.

Last update: 2024-04-03 10:08:46 UTC


README

Dockerfile -- a text file that contains all commands, in order, needed to build a docker image

Docker Engine should already be installed on you maschine. See installation instruction on:

What is Docker from official site: Docker makes development efficient and predictable Docker takes away repetitive, mundane configuration tasks and is used throughout the development lifecycle for fast, easy and portable application development – desktop and cloud. Docker’s comprehensive end to end platform includes UIs, CLIs, APIs and security that are engineered to work together across the entire application delivery lifecycle.

Docker Engine Overview

Installation

Please refer to the online documentation for Docker engine installation

Docker Installation

Docker Installation Ubuntu

Docker Installation Mint do same installation steps described by Ubuntu

with the following command to set up the repository:

 echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  <UBUNTU_VERSION_NAME> stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Value of <UBUNTU_VERSION_NAME> should be get on Ubuntu via command $(lsb_release -cs)

Setup Docker for development in new Project

Preparation

Provided Dockerfile includes all installation instructions for needed Software, and is prepared so for minimal necessary software stack, will be included after image builds. The Installing of extra software/extensions can be enabled via uncommenting some blocks which contains installation instructions.

Project integration

Copy Dockerfile you are interested e.g. PHP 7.4 on Debian 10 with Apache webserver in Project directory, or in a specific subdirectory in Project e.g. .docker.

Get an Image complied from Dockerfile with specific tag name -t run build command

docker build --build-arg APPUID=$(id -u) --build-arg APPUGID=$(id -g) . -t PROJECTNAME

where . is directory wo Dockerfile was copied previously and PROJECTNAME is expected image name.

Pull docker image to docker.hub. You need username/password of

docker login
# enter credentials
# ...

# push image
docker push <TAG_NAME>

Working with Docker

After image was build we could start this as a container in detached mode

docker run -it --rm -d -v $PWD:/app

and check that the container is available with command docker ps To open a terminal session within running container we need a CONTAINER_IDthis one we got from output of docker ps command. Open terminal session docker exec -it -u (id -u):(id -g) CONTAINER_ID bash

Shutdown all containers

docker ps -aq | xargs docker stop | xargs docker rm

Example Build and Tagging: docker build --build-arg APPUID=1000 --build-arg APPUGID=1000 -t waglpz/vwd-base:8.2 php/8.2/bullseye/apache/

...