Skip to content

Commit

Permalink
Switch base image to wodby/php
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoepner committed Aug 21, 2019
1 parent d799fe4 commit fe78a9f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 92 deletions.
42 changes: 5 additions & 37 deletions 7.1/Dockerfile
@@ -1,46 +1,14 @@
FROM php:7.1
FROM wodby/php:7.1

ARG COMPOSER_VERSION=1.9.0
ARG DEPLOYER_VERSION=6.5.0
ARG DEPLOYER_VERSION=6.4.6

ARG APP_USER=rdoepner
ARG APP_UID=1000
ARG APP_GROUP=rdoepner
ARG APP_GID=1000

# Create app user
RUN set -ex; \
addgroup --gid $APP_GID $APP_GROUP; \
adduser --uid $APP_UID --gid $APP_GID --disabled-password --gecos "" $APP_USER

# Install system requirements
RUN set -ex; \
apt-get update && apt-get install --yes \
rsync \
wget \
curl \
git \
unzip \
mariadb-client \
openssh-client \
zlib1g-dev; \
\
rm -rf /var/lib/apt/lists/*

# Install extensions
RUN set -ex; \
docker-php-ext-install zip

# Install composer
RUN set -ex; \
wget -qO - https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \
--filename=composer \
--version=$COMPOSER_VERSION
USER root

# Install deployer
RUN set -ex; \
wget -qO /usr/local/bin/deployer \
https://deployer.org/releases/v$DEPLOYER_VERSION/deployer.phar; \
\
chmod +x /usr/local/bin/deployer

USER wodby
42 changes: 5 additions & 37 deletions 7.2/Dockerfile
@@ -1,46 +1,14 @@
FROM php:7.2
FROM wodby/php:7.2

ARG COMPOSER_VERSION=1.9.0
ARG DEPLOYER_VERSION=6.5.0
ARG DEPLOYER_VERSION=6.4.6

ARG APP_USER=rdoepner
ARG APP_UID=1000
ARG APP_GROUP=rdoepner
ARG APP_GID=1000

# Create app user
RUN set -ex; \
addgroup --gid $APP_GID $APP_GROUP; \
adduser --uid $APP_UID --gid $APP_GID --disabled-password --gecos "" $APP_USER

# Install system requirements
RUN set -ex; \
apt-get update && apt-get install --yes \
rsync \
wget \
curl \
git \
unzip \
mariadb-client \
openssh-client \
zlib1g-dev; \
\
rm -rf /var/lib/apt/lists/*

# Install extensions
RUN set -ex; \
docker-php-ext-install zip

# Install composer
RUN set -ex; \
wget -qO - https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \
--filename=composer \
--version=$COMPOSER_VERSION
USER root

# Install deployer
RUN set -ex; \
wget -qO /usr/local/bin/deployer \
https://deployer.org/releases/v$DEPLOYER_VERSION/deployer.phar; \
\
chmod +x /usr/local/bin/deployer

USER wodby
31 changes: 13 additions & 18 deletions README.md
@@ -1,36 +1,31 @@
# Docker Deployer
# PHP Deployer

PHP Docker image for Deployer and Composer
Docker image for Deployer and Composer

Base image: [wodby/php](https://github.com/wodby/php)

## Usage

**Run Deployer**

```bash
docker run --rm \
-u rdoepner \
-v $PWD:/app \
-w /app \
rdoepner/docker-deployer deployer
docker run --rm -v $PWD:/app -w /app rdoepner/docker-deployer deployer
```

**Run Composer**

```bash
docker run --rm \
-u rdoepner \
-v $PWD:/app \
-w /app \
rdoepner/docker-deployer composer
docker run --rm -v $PWD:/app -w /app rdoepner/docker-deployer composer
```

## User

Name | UID | GID
----- | ---- | ---
wodby | 1000 | 1000

## Build arguments

Argument | Default value
---------------- | -------------
COMPOSER_VERSION | 1.9.0
DEPLOYER_VERSION | 6.5.0
APP_USER | rdoepner
APP_UID | 1000
APP_GROUP | rdoepner
APP_GID | 1000
DEPLOYER_VERSION | 6.4.6

0 comments on commit fe78a9f

Please sign in to comment.