-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer #3
base: master
Are you sure you want to change the base?
Composer #3
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
FROM pmmp/pocketmine-mp:latest | ||
FROM ubuntu:18.04 as phpBuild | ||
|
||
USER root | ||
RUN apt-get update && apt-get install -y --no-install-recommends git | ||
|
||
RUN mkdir /php | ||
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates wget make autoconf automake libtool-bin m4 gzip bzip2 bison g++ git cmake pkg-config re2c | ||
WORKDIR /php | ||
RUN wget -q https://raw.githubusercontent.com/pmmp/php-build-scripts/stable/compile.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't work for PM5. |
||
RUN bash compile.sh -t linux64 -f -u -g -l -j | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These flags will need updating - also, |
||
|
||
# New slate to lose all unwanted libs (~300mb lost here) | ||
FROM ubuntu:18.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same again here |
||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates wget | ||
|
||
COPY --from=phpBuild /php/bin/php7 /usr/php | ||
RUN grep -q '^extension_dir' /usr/php/bin/php.ini && \ | ||
sed -ibak "s{^extension_dir=.*{extension_dir=\"$(find /usr/php -name *debug-zts*)\"{" /usr/php/bin/php.ini || echo "extension_dir=\"$(find /usr/php -name *debug-zts*)\"" >> /usr/php/bin/php.ini | ||
RUN ln -s /usr/php/bin/php /usr/bin/php | ||
|
||
RUN wget -qO - https://getcomposer.org/installer | php | ||
RUN mv composer.phar /usr/bin/composer | ||
RUN wget -qO /usr/bin/phpstan https://github.com/phpstan/phpstan/releases/download/0.12.38/phpstan.phar | ||
RUN chmod o+x /usr/bin/phpstan | ||
ADD entry.php /usr/bin/entry | ||
ADD default.phpstan.neon /pocketmine/default.phpstan.neon | ||
RUN mkdir /deps | ||
|
||
RUN mkdir /source | ||
RUN chown 1000:1000 /pocketmine/default.phpstan.neon /deps /source -R | ||
RUN mkdir /source/poggit_deps | ||
|
||
# Default files: | ||
ADD entry.php /usr/bin/entry | ||
ADD default.phpstan.neon /source/default.phpstan.neon | ||
|
||
# Permissions: | ||
RUN groupadd -g 1000 client | ||
RUN useradd -r -m -u 1000 -g client client | ||
|
||
RUN chown 1000:1000 /source -R | ||
|
||
USER pocketmine | ||
USER client | ||
WORKDIR /source | ||
|
||
ENV PLUGIN_PATH / | ||
ENV PHPSTAN_CONFIG /pocketmine/default.phpstan.neon | ||
ENTRYPOINT ["entry"] | ||
CMD [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
parameters: | ||
level: 4 | ||
level: 5 | ||
paths: | ||
- /source/src | ||
autoload_directories: | ||
- /source/src | ||
- /deps | ||
autoload_files: | ||
- phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php | ||
- src | ||
excludePaths: | ||
analyse: | ||
- poggit_deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18.04 is obsolete