-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
88 lines (75 loc) · 2.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM ubuntu:16.04
# set env vars
ENV container docker
ENV LC_ALL C.UTF-8
ENV COMPOSER_VERSION=1.6.3 \
COMPOSER_HOME=/composer \
PATH=$COMPOSER_HOME/vendor/bin:$PATH
#set build vars
ARG DEBIAN_FRONTEND=noninteractive
# configure apt behaviour
RUN echo "APT::Get::Install-Recommends 'false'; \n\
APT::Get::Install-Suggests 'false'; \n\
APT::Get::Assume-Yes "true"; \n\
APT::Get::force-yes "true";" > /etc/apt/apt.conf.d/00-general
# systemd tweaks
RUN rm -rf /lib/systemd/system/getty*;
# install
RUN apt-get update && apt-get install -yq apt-utils
# install typical requirements for testing
RUN apt-get install -yq \
apt-transport-https \
build-essential expect \
ca-certificates \
curl \
git \
gnupg2 \
iproute \
net-tools \
pinentry-tty \
procps \
python \
rpm \
ruby-dev \
software-properties-common \
ssl-cert \
sudo \
syslog-ng \
unzip \
vim \
wget
# add current php repository
RUN add-apt-repository ppa:ondrej/php -y
RUN apt-get update
# install php
RUN apt-get install -yq \
php \
php-common \
php-curl \
php-gd \
php-imap \
php-intl \
php-mbstring \
php-mcrypt \
php-mysql \
php-xml
# install composer + parallel install plugin
COPY install-composer.sh /usr/local/bin/install-composer.sh
RUN mkdir -p $COMPOSER_HOME \
&& ( install-composer.sh && rm /usr/local/bin/install-composer.sh ) \
&& export COMPOSER_ALLOW_SUPERUSER=1 \
&& composer global require -a --prefer-dist "hirak/prestissimo:^0.3" \
&& export COMPOSER_ALLOW_SUPERUSER=0 \
&& chmod -R 0777 $COMPOSER_HOME/cache \
&& rm -Rf /var/cache/apk/* \
&& rm -Rf $COMPOSER_HOME/cache/*
# install fpm
RUN apt-get install -yq libffi-dev
RUN gem install fpm --no-ri --no-rdoc
# install ghr
RUN wget -O /tmp/ghr.zip https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip && (cd /usr/local/bin && unzip /tmp/ghr.zip) && chmod +x /usr/local/bin/ghr
# cleanup
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# finally run script on startup
CMD ["/bin/bash"]