Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

Commit

Permalink
Enhancement: Build Docker image based on PHAR
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 3, 2020
1 parent 31dcf39 commit e137a33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ LABEL "repository"="https://github.com/ergebnis/composer-normalize-action"
LABEL "homepage"="https://github.com/ergebnis/composer-normalize"
LABEL "maintainer"="Andreas Möller <[email protected]>"

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

ENV COMPOSER_ALLOW_SUPERUSER=1

RUN composer global require ergebnis/composer-normalize:2.2.0 --no-interaction --no-progress --no-suggest

RUN mkdir /app

WORKDIR /app

ENTRYPOINT ["/usr/local/bin/composer", "normalize"]

CMD ["--dry-run"]
ENV VERSION=2.5.1

RUN apk add --no-cache gnupg \
&& cd /opt/ \
&& wget https://github.com/ergebnis/composer-normalize/releases/download/${VERSION}/composer-normalize.phar.asc \
&& wget https://github.com/ergebnis/composer-normalize/releases/download/${VERSION}/composer-normalize.phar \
&& gpg --yes --keyserver pool.sks-keyservers.net --recv-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13 \
&& gpg --yes --verify composer-normalize.phar.asc composer-normalize.phar \
&& chmod +x composer-normalize.phar \
&& mv composer-normalize.phar /usr/bin/composer-normalize

ENTRYPOINT ["/usr/bin/composer-normalize"]
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.PHONY: docker help it

COMPOSER_NORMALIZE_VERSION:=2.5.1
DOCKER_IMAGE:=ergebnis/composer-normalize-action

it: docker ## Runs the docker target
Expand Down

0 comments on commit e137a33

Please sign in to comment.