Add code formatter
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
FROM node:8-slim
|
||||
|
||||
# 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 php5-cli && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /tmp/* /var/tmp/*
|
||||
|
||||
|
||||
# add php fixer
|
||||
RUN curl -L http://cs.sensiolabs.org/download/php-cs-fixer-v2.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
|
||||
Reference in New Issue
Block a user