waglpz/docker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

waglpz/docker

最新稳定版本:v1.0.0

Composer 安装命令:

composer require waglpz/docker

包简介

Some Dockerfiles

README 文档

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/

...

统计信息

  • 总下载量: 64
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: Dockerfile

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-18