Skip to content

Commit

Permalink
Created a Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
tchalvak committed Mar 24, 2018
1 parent be569d0 commit 1ded2fd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
@@ -0,0 +1,33 @@

FROM richarvey/nginx-php-fpm:1.4.0
# Comes with alpine linux 3.6

ARG username=nw

WORKDIR ./

COPY . .

ENV DBUSER=nwserver

# Various preps for alpine environment
RUN echo "Commencing PREP..." && \
apk add make && \
apk add --upgrade apk-tools && \
apk update && \
apk add nodejs && \
apk add postgresql && \
echo "Creating the resources file from the resources.build.php..." && \
#sed "0,/postgres/{s/postgres/${DBUSER}/}" deploy/resources.build.php > deploy/resources.php && \
#sed "s|/srv/ninjawars/|../..|g" deploy/tests/karma.conf.js > karma.conf.js && \
echo "PREP done, starting install..." && \
./configure && make && make install && \
echo "Install not run."

ENV HOST=0.0.0.0 \
PORT=7654

EXPOSE 7654

# Run with: docker run --rm -it -p 7654:7654 nw-server
CMD ["make" "test"]
6 changes: 6 additions & 0 deletions README.markdown
Expand Up @@ -55,6 +55,12 @@ Then you can run the tests to check your progress with:

*See ./docs/INSTALL if you need more.*

## Run the Docker

* Init tagged image: `docker build -t nw-server .`
* Run it: `docker run --rm -it -p 7654:7654 nw-server`
* Stop the container: `docker stop nw-server`

## To Contribute

See CONTRIBUTING.md

0 comments on commit 1ded2fd

Please sign in to comment.