-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: publish a docker image on release (#853)
I unfortunately could not take the username `humbug` which would match the namespace for the packagist package, and docker hub does not accept dashes nor less than 4 character usernames. So the final name picked is `boxproject`. This PR is a rebased version of #694. Closes #694. Closes #693. Co-authored-by: Daniel Reiche <[email protected]>
- Loading branch information
1 parent
cfd4273
commit 22c6ebe
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM php:8.1-cli-alpine | ||
|
||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
RUN install-php-extensions zlib phar sodium tokenizer filter | ||
|
||
COPY bin/box.phar /box.phar | ||
|
||
ENTRYPOINT ["/box.phar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM php:8.1-cli-alpine as build-stage | ||
|
||
RUN apk add --update make git | ||
|
||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
|
||
RUN mkdir -p /opt/box-project/box | ||
WORKDIR /opt/box-project/box | ||
ADD . /opt/box-project/box | ||
RUN cd /opt/box-project/box && \ | ||
make compile | ||
|
||
FROM php:8.1-cli-alpine | ||
|
||
COPY --from=build-stage /opt/box-project/box/bin/box.phar /usr/bin/box | ||
|
||
RUN mkdir -p /local | ||
WORKDIR /local | ||
ENTRYPOINT ["/usr/bin/box"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters