All Projects → xtreamwayz → dockerfiles

xtreamwayz / dockerfiles

Licence: MIT License
Skeleton for a Docker nginx / php / mysql / redis development stack. Everything in its own container!

Programming Languages

Dockerfile
14818 projects
Makefile
30231 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to dockerfiles

Docker Oidc Proxy
Docker Image built on Alpine Linux for secure OpenID Connect (OIDC) proxy authentication
Stars: ✭ 91 (+658.33%)
Mutual labels:  docker-image, alpine-linux
Jekyll Docker
⛴ Docker images, and CI builders for Jekyll.
Stars: ✭ 804 (+6600%)
Mutual labels:  docker-image, alpine-linux
Docker Alpine
Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
Stars: ✭ 574 (+4683.33%)
Mutual labels:  docker-image, alpine-linux
Socat
Run socat command in alpine container
Stars: ✭ 53 (+341.67%)
Mutual labels:  docker-image, alpine-linux
Docker Ruby Node
🐳 Alpine Docker Image with latest versions of Ruby, Node.js and yarn installed. This Docker Image is actively maintained and updated regularly.
Stars: ✭ 74 (+516.67%)
Mutual labels:  docker-image, alpine-linux
Alpine Erlang
An alpine image with Erlang installed, intended for releases
Stars: ✭ 73 (+508.33%)
Mutual labels:  docker-image, alpine-linux
Docker Kubectl
Containerized Kubernetes kubectl
Stars: ✭ 52 (+333.33%)
Mutual labels:  docker-image, alpine-linux
Svn Docker
Lightweight Docker image to build a container running an SVN server
Stars: ✭ 87 (+625%)
Mutual labels:  docker-image, alpine-linux
Alpine Vim
"dockerized" Vim
Stars: ✭ 242 (+1916.67%)
Mutual labels:  docker-image, alpine-linux
alpine-buildpack-deps
An attempt at a "buildpack-deps"-like Docker image with Alpine Linux
Stars: ✭ 30 (+150%)
Mutual labels:  alpine-linux
static-web-server
A blazing fast and asynchronous web server for static files-serving. ⚡
Stars: ✭ 230 (+1816.67%)
Mutual labels:  alpine-linux
docker-pure-ftpd
Pure-FTPd Docker image based on Alpine Linux with MySQL, PostgreSQL and LDAP support
Stars: ✭ 36 (+200%)
Mutual labels:  alpine-linux
docker-lamp
Alpine docker with lamp (php7)
Stars: ✭ 42 (+250%)
Mutual labels:  alpine-linux
Go-Small-Docker-Image
Creating a smaller golang docker image
Stars: ✭ 32 (+166.67%)
Mutual labels:  docker-image
alpine-make-rootfs
Make customized Alpine Linux rootfs (base image) for containers
Stars: ✭ 95 (+691.67%)
Mutual labels:  alpine-linux
docker-jmx-prometheus-exporter
Dockerized jmx-exporter for prometheus
Stars: ✭ 24 (+100%)
Mutual labels:  docker-image
alpinist
Automatic Alpine Linux Package (apk) Repository Generation using AWS Lambda, S3 & SSM Parameter Store
Stars: ✭ 45 (+275%)
Mutual labels:  alpine-linux
alpine-php-wordpress
Wordpress running on Alpine Linux [Docker]
Stars: ✭ 30 (+150%)
Mutual labels:  alpine-linux
docker-debian-releases
Creates docker images of historic Debian-based distribution releases
Stars: ✭ 19 (+58.33%)
Mutual labels:  docker-image
alpine-vagrant
This builds an up-to-date Vagrant Alpine Linux Base Box
Stars: ✭ 22 (+83.33%)
Mutual labels:  alpine-linux

dockerfiles

build-nginx build-mysql build-php-7-4 build-php-8-0 build-php-8-1

This is part of the xtreamwayz/dockerfiles.

A collection of customized containers for a Docker web development stack. Where possible the containers are build on top of Alpine Linux for a small footprint.

containers

Usage

  1. Use a custom docker-compose.yml file to do the work for you. Adjust the settings needed for the project.
  2. Copy .env.dist to .env and change at least the project id.
  3. Start the container with docker-compose up -d.

Fixing "Permission Denied" Issues

Use setfacl to set permission on the host

sudo setfacl -Rm g:82:rwX,d:g:82:rwX /home/<username>/projects

Setup permissions for docker so the files can be accessed and deleted. The trick is to use the uid's from the docker processes. www-data/nginx: 82 - docker: 999 - mysql: 28

# Preserve default permissions for new files and folders
sudo setfacl -dR -m u:28:rwx -m u:82:rwx -m u:33:rwx -m u:999:rwx -m u:$(whoami):rwx data
# Set permissions
sudo setfacl -R -m u:28:rwx -m u:82:rwx -m u:33:rwx -m u:999:rwx -m u:$(whoami):rwx data

Xdebug

Xdebug is configured so it doesn't start automatically. You need to enable the debug listener in PhpStorm first and enable a session cookie in your Chrome or Firefox browser.

Building manually

docker build . --file Dockerfile --tag dev
docker run --rm -it tag

Docker commands

Start containers

$ docker-compose up -d

Start and force rebuilding the containers

$ docker-compose up --build

Stop containers

$ docker-compose stop

Update containers

$ docker-compose pull

Stream logs from all containers to the console

$ docker-compose logs -t -f

Start a terminal for <container_name>

# With docker-compose
$ docker-compose run --rm php /bin/bash   # Ubuntu/Debian based
$ docker-compose run --rm php /bin/sh     # Alpine Linux based
# With docker
$ docker exec -ti <container_name> /bin/bash   # Ubuntu/Debian based
$ docker exec -ti <container_name> /bin/sh     # Alpine Linux based

Docker maintenance commands

Stats for running containers

$ docker stats -a

Show used space, similar to the unix tool df

$ docker system df

Remove development junk: unused volumes, networks, exited containers and unused images

$ docker system prune --force --all

List all images

$ docker images

List containers

$ docker ps

Force stop all containers in PowerShell

> docker ps -a -q | ForEach { docker stop $_ }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].