Skip to content

Commit

Permalink
add docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
waxzce committed May 22, 2017
1 parent 7018e94 commit e63e4e8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.gitignore
.travis.yml
target
LICENSE
README.md
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

FROM alpine:edge

#COPY ["Cargo.*", "/source/"]
#COPY bin/ /source/bin/
#COPY command/ /source/command/
#COPY lib/ /source/lib/
#COPY ctl/ /source/ctl/
COPY . /source/
COPY bin/config.toml /etc/sozu/sozu.toml

RUN apk add --no-cache --virtual .build-dependencies \
cargo \
g++ \
gcc \
musl-dev \
rust && \
apk add --no-cache openssl-dev llvm-libunwind && \
cd /source && cd ctl && \
cargo build --release && \
cd ../bin && \
cargo build --release && \
cp /source/target/release/sozu /bin/sozu && \
cp /source/target/release/sozuctl /bin/sozuctl && \
cd / && \
apk del .build-dependencies && \
apk del && \
rm -rf /source && \
rm -rf /root/.cargo

EXPOSE 80
EXPOSE 443

ENTRYPOINT ["/bin/sozu"]

0 comments on commit e63e4e8

Please sign in to comment.