File tree Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Original file line number Diff line number Diff line change 1
- FROM base/archlinux:latest
1
+ FROM php:7.0-alpine
2
2
3
3
MAINTAINER Spencer Rinehart <
[email protected] >
4
4
5
- RUN curl -o /etc/pacman.d/mirrorlist "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&ip_version=6&use_mirror_status=on" && sed -i 's/^#//' /etc/pacman.d/mirrorlist
6
-
7
- # Update system and install php + composer dependencies (git and openssh for
8
- # access to repositories)
9
- RUN pacman-key --refresh-keys && \
10
- pacman --sync --refresh --noconfirm --noprogressbar --quiet && \
11
- pacman --sync --noconfirm --noprogressbar --quiet archlinux-keyring openssl pacman && \
12
- pacman-db-upgrade && \
13
- pacman --sync --sysupgrade --noconfirm --noprogressbar --quiet && \
14
- pacman --sync --noconfirm --noprogressbar --quiet php git openssh
15
-
16
- # Configure the base system. Timezone is there to silence php's silly
17
- # warnings.
18
- COPY timezone.ini /etc/php/conf.d/
5
+ RUN apk add --no-cache --virtual .php-composer-deps git openssh
19
6
20
7
RUN mkdir /code
21
8
WORKDIR /code
22
9
23
- ENV HOME /root
24
10
ENV COMPOSER_HOME $HOME/.composer
25
11
26
12
# Setup and install composer into the composer global location. The
27
13
# certificate is installed manually to get around open_basedir restrictions.
28
14
RUN mkdir -p $COMPOSER_HOME/vendor/bin
29
- RUN curl -sSLo $COMPOSER_HOME/cacert.pem http ://curl.haxx.se/ca/cacert.pem
30
- RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=$COMPOSER_HOME/vendor/bin --filename=composer --cafile=$COMPOSER_HOME/cacert.pem
15
+ RUN curl -sSL https ://getcomposer.org/installer | \
16
+ php -- --install-dir=$COMPOSER_HOME/vendor/bin --filename=composer
31
17
32
18
# Setup PATH to prioritize local composer bin and global composer bin ahead of
33
19
# system PATH.
Original file line number Diff line number Diff line change 2
2
This is a base image for building [ PHP] [ PHP ] [ composer] packages.
3
3
4
4
## Purpose
5
- This docker image builds on top of Arch Linux's base/archlinux image for the
5
+ This docker image builds on top of the official PHP 7.0-alpine image with the
6
6
purpose of building PHP composer packages. It provides several key features:
7
7
8
8
* Access to the build location will be in the volume located at ` /code ` . This
9
9
directory will be the default working directory.
10
10
* Composer bin directories are automatically included in ` PATH ` . Both a
11
11
relative ` vendor/bin ` directory, and the global ` $COMPOSER_HOME/vendor/bin `
12
12
directory are included in the ` PATH ` .
13
- * Timezone set to ` UTC ` by default to remove the warnings with PHP's date and
14
- time functions. This can be overridden by updating
15
- ` /etc/php/conf.d/timezone.ini ` .
16
13
17
14
## Usage
18
15
This library is useful with simple ` composer.json ` 's from the command line.
@@ -73,7 +70,8 @@ process alone could look like this:
73
70
``` dockerfile
74
71
FROM nubs/composer-build
75
72
76
- RUN pacman --sync --noconfirm --noprogressbar --quiet xdebug
73
+ RUN apk add --no-cache xdebug && \
74
+ docker-php-ext-enable xdebug
77
75
```
78
76
79
77
You can then build this docker image and run it against your ` composer.json `
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments