Skip to content

Commit

Permalink
Merge pull request UltimaPHP#72 from youhide/master
Browse files Browse the repository at this point in the history
updt docker
  • Loading branch information
youhide authored Feb 16, 2019
2 parents 61fe93f + 5943a7e commit be98460
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
FROM php:7.2-cli-alpine3.8
FROM php:7.3.2-cli-stretch

MAINTAINER Youri hideOut <[email protected]>

RUN apk add autoconf g++ make openssl-dev libmcrypt-dev
RUN apt update \
&& apt install -y unzip libgmp-dev
RUN pecl install mongodb \
&& docker-php-ext-install sockets \
&& docker-php-ext-enable mongodb
&& docker-php-ext-install sockets gmp \
&& docker-php-ext-enable mongodb

RUN wget -O /tmp/UOLocation.zip https://ultimaphp.nyc3.digitaloceanspaces.com/ultimaphpmuls.zip
RUN ggID='1SsMQsIq_EhAbofKECYXkiKzSM0D63YE-' \
&& ggURL='https://drive.google.com/uc?export=download' \
&& filename="$(curl -sc /tmp/gcokie "${ggURL}&id=${ggID}" | grep -o '="uc-name.*</span>' | sed 's/.*">//;s/<.a> .*//')" \
&& getcode="$(awk '/_warning_/ {print $NF}' /tmp/gcokie)" \
&& curl -Lb /tmp/gcokie "${ggURL}&confirm=${getcode}&id=${ggID}" -o "/tmp/${filename}"

WORKDIR /ultimaphp
COPY . ./
RUN mkdir -p UOLocation
RUN unzip -o /tmp/UOLocation.zip -d ./UOLocation
RUN rm -rf /tmp/UOLocation.zip
RUN unzip -o /tmp/Muls.zip -d ./UOLocation
RUN rm -rf /tmp/Muls.zip

# RUN DOCKER_IP=$(awk 'END{print $1}' /etc/hosts); sed -i -- "s/ip=127.0.0.1/ip=${DOCKER_IP}/g" ultimaphp.ini
# RUN sed -i -- 's/ip=127.0.0.1/ip=0.0.0.0/g' ultimaphp.ini
# RUN sed -i -- 's/host=127.0.0.1/host=mongo/g' ultimaphp.ini
RUN sed -i -- 's/host=127.0.0.1/host=mongo/g' ultimaphp.ini

CMD [ "php", "startserver.php" ]

EXPOSE 2593
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.1'
services:

uphp-server:
image: hideout/ultimaphp:latest
build: ./
ports:
- "2593:2593"

Expand Down

0 comments on commit be98460

Please sign in to comment.