-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (28 loc) · 1.16 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
ARG PHP_VERSION
FROM php:${PHP_VERSION} as standards-runtime
RUN apt-get update
RUN apt-get install -y unzip libpng-dev libicu-dev libxslt-dev jq git libzip-dev wget python3-venv
RUN apt-get clean
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install gd bcmath zip intl xsl pdo_mysql soap sockets
RUN mkdir /composer
COPY composer.json /composer
RUN cd /composer && \
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true && \
composer install
FROM standards-runtime
ENV PYTHONUNBUFFERED=1
RUN apt-get install -y python3-dev python3-pip
RUN apt-get clean
COPY pipe /
RUN chmod a+x /pipe.py
COPY requirements.txt /
RUN python3 -m venv /venv
RUN /venv/bin/pip install --no-cache-dir -r /requirements.txt
# Allow git access to mounted build directories
RUN git config --global --add safe.directory /build
RUN mkdir -p /opt/atlassian/pipelines/agent/build
RUN git config --global --add safe.directory /opt/atlassian/pipelines/agent/build
RUN mkdir -p /github/workspace
RUN git config --global --add safe.directory /github/workspace
ENTRYPOINT ["/pipe.py"]