Skip to content

Commit

Permalink
Merge pull request andreimarcu#101 from mutantmonkey/docker
Browse files Browse the repository at this point in the history
Add Dockerfile
  • Loading branch information
andreimarcu authored Sep 18, 2016
2 parents 4ef3f33 + 932a470 commit 3321144
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:alpine

RUN set -ex \
&& apk add --no-cache --virtual .build-deps git mercurial \
&& go get github.com/andreimarcu/linx-server \
&& apk del .build-deps

VOLUME ["/data/files", "/data/meta"]

EXPOSE 8080
USER nobody
ENTRYPOINT ["/go/bin/linx-server", "-bind=0.0.0.0:8080", "-filespath=/data/files/", "-metapath=/data/meta/"]
CMD ["-sitename=linx", "-allowhotlink"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ Run linx-server with the ```-certfile path/to/cert.file``` and ```-keyfile path/
#### 3. Using the built-in http server
Run linx-server normally.

#### 4. Using Docker with the built-in http server
First, build the image:
```docker build -t linx-server .```

You'll need some directories for the persistent storage. For the purposes of this example, we will use `/media/meta` and `/media/files`.

Then, run it:
```docker run -p 8080:8080 -v /media/meta:/data/meta -v /media/files:/data/files linx-server```


Development
-----------
Expand Down

0 comments on commit 3321144

Please sign in to comment.