Skip to content

Commit

Permalink
Merge pull request #25 from michielbdejong/dockerfile
Browse files Browse the repository at this point in the history
Add Dockerfile
  • Loading branch information
michielbdejong authored Jun 29, 2016
2 parents 1810fcb + 255cae3 commit 8cc7f79
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM debian:jessie
# Adapted from https://raw.githubusercontent.com/Scorpil/docker-rust/master/nightly/Dockerfile

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install \
ca-certificates \
curl \
gcc \
libc6-dev \
libssl-dev \
libsqlite3-dev \
redis-server \
-qqy \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

ENV RUST_ARCHIVE=rust-nightly-x86_64-unknown-linux-gnu.tar.gz
ENV RUST_VERSION=2016-03-07
ENV RUST_DOWNLOAD_URL=https://static.rust-lang.org/dist/$RUST_VERSION/$RUST_ARCHIVE

RUN mkdir /rust
WORKDIR /rust

RUN curl -fsOSL $RUST_DOWNLOAD_URL \
&& curl -s $RUST_DOWNLOAD_URL.sha256 | sha256sum -c - \
&& tar -C /rust -xzf $RUST_ARCHIVE --strip-components=1 \
&& rm $RUST_ARCHIVE \
&& ./install.sh

COPY . /rust
RUN cd /rust && cargo build --release
CMD service redis-server start && RUST_LOG=info ./target/release/registration_server -h 0.0.0.0 -p 4443 --cert-directory /certdir
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This server exposes a http(s) API that lets you post messages from your home net
Usage:

```bash
cargo run -- -host 0.0.0.0 --port 4242 --cert-dir /etc/letsencrypt/live/knilxof.org
cargo run -- -h 0.0.0.0 -p 4242 --cert-dir /etc/letsencrypt/live/knilxof.org

## Urls

Expand Down

0 comments on commit 8cc7f79

Please sign in to comment.