-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
95 lines (76 loc) · 3.59 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
89
90
91
92
93
94
95
FROM docker:17.12.0-ce as static-docker-source
FROM ubuntu:18.04
LABEL maintainer="https://github.com/hrcc"
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL C.UTF-8
# good colors for most applications
ENV TERM xterm
# avoid million NPM install messages
ENV npm_config_loglevel warn
# allow installing when the main user is root
ENV npm_config_unsafe_perm true
# version of the Google Cloud SDK
ENV CLOUD_SDK_VERSION 200.0.0
# INSTALL
RUN apt-get update \
&& apt-get install -y apt-utils curl wget unzip git software-properties-common lsb-release
# Dockerize v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz \
&& rm dockerize-linux-amd64-v0.6.1.tar.gz
# PHP 7.4
RUN add-apt-repository -y ppa:ondrej/php && apt-get update \
&& apt-get install -y libpq-dev libpng-dev php-pear \
php7.4-dev php7.4-fpm php7.4-cli php7.4-gd php7.4-bcmath \
php7.4-mysql php7.4-imap php7.4-mbstring \
php7.4-json php7.4-curl php7.4-gd php7.4-gmp php7.4-zip php-redis php7.2-xml \
php-yaml php7.4-xml php-mongodb imagemagick php-imagick php7.4-xdebug \
&& mkdir /run/php
# Java
RUN apt-get install -y default-jdk
# Composer
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
# MySQL
RUN apt-get update && apt-get install -y mysql-client
# Node.js v12
RUN curl --silent --location https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install nodejs -y
# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
# Cypress.js dependencies
RUN apt-get update && \
apt-get install -y libgtk2.0-0 libnotify-dev libgconf-2-4 \
libnss3 libxss1 libasound2 xvfb
# Google Cloud SDK
# copied from https://hub.docker.com/r/google/cloud-sdk/~/dockerfile/
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" > /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update && \
apt-get install -y google-cloud-sdk=${CLOUD_SDK_VERSION}-0 && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_image
# Cloud SQL Proxy
ADD https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 /usr/local/bin/cloud_sql_proxy
RUN chmod +x /usr/local/bin/cloud_sql_proxy
# CircleCI
COPY --from=static-docker-source /usr/local/bin/docker /usr/local/bin/docker
ADD https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci /usr/local/bin/circleci
RUN chmod +x /usr/local/bin/circleci
# Lokalise
ADD https://s3-eu-west-1.amazonaws.com/lokalise-assets/cli/lokalise-0.711-linux-amd64.tgz /tmp
RUN cd tmp && tar xvfz lokalise*.tgz && mv /tmp/lokalise /usr/local/bin
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update && apt-get install -y google-chrome-stable
# Install Goss
RUN curl -fsSL https://goss.rocks/install | sh
# Cleanup for smaller image size
RUN apt-get remove -y --purge apt-utils software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*