WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ RUN set -ex \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"

RUN set -ex \
&& apk update \
&& apk add --no-cache shadow \
&& groupadd -r hyperf-user \
&& useradd -r -g hyperf-user hyperf-user \
&& apk del shadow \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man

WORKDIR /opt/www

# Composer Cache
Expand All @@ -49,6 +57,8 @@ WORKDIR /opt/www
COPY . /opt/www
RUN composer install --no-dev -o && php bin/hyperf.php

USER hyperf-user

EXPOSE 9501

ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"]