42 lines
1.1 KiB
Docker
42 lines
1.1 KiB
Docker
FROM node:8-stretch
|
|
|
|
# https support
|
|
RUN apt-get update && \
|
|
apt-get install -y apt-transport-https ca-certificates
|
|
|
|
# add yarn and php
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
|
apt-get update && \
|
|
apt-get install -y yarn php7.0-cli && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /tmp/* /var/tmp/*
|
|
|
|
|
|
# add php fixer
|
|
RUN curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.10.0/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && \
|
|
chmod a+x /usr/local/bin/php-cs-fixer
|
|
|
|
WORKDIR /app
|
|
|
|
# add csscomb and prettier
|
|
RUN yarn add prettier csscomb --global && \
|
|
ln -s /app/node_modules/.bin/prettier /usr/local/bin/prettier && \
|
|
ln -s /app/node_modules/.bin/csscomb /usr/local/bin/csscomb
|
|
|
|
COPY ["src/entry.sh", "/app/entry.sh"]
|
|
|
|
COPY ["src/inc", "/app/inc"]
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
CMD ["/app/entry.sh"]
|
|
ENTRYPOINT ["/app/entry.sh"]
|
|
|
|
|
|
ARG VERSION
|
|
ARG COMMIT_SHA
|
|
ENV VERSION=$VERSION
|
|
ENV COMMIT_SHA=$COMMIT_SHA
|