-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 866 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Simple usage with a mounted data directory:
# > docker build -t ton .
# > docker run -v $HOME/.tond:/root/.tond ton init
# > docker run -v $HOME/.tond:/root/.tond ton start
FROM alpine:edge
# Set up dependencies
ENV PACKAGES go glide make git libc-dev bash
# Set up GOPATH & PATH
ENV GOPATH /root/go
ENV BASE_PATH $GOPATH/src/github.com/tepleton
ENV REPO_PATH $BASE_PATH/tepleton-sdk
ENV WORKDIR /tepleton/
ENV PATH $GOPATH/bin:$PATH
# Link expected Go repo path
RUN mkdir -p $WORKDIR $GOPATH/pkg $ $GOPATH/bin $BASE_PATH
# Add source files
ADD . $REPO_PATH
# Install minimum necessary dependencies, build Tepleton SDK, remove packages
RUN apk add --no-cache $PACKAGES && \
cd $REPO_PATH && make get_tools && make get_vendor_deps && make build && make install && \
apk del $PACKAGES
# Set entrypoint
ENTRYPOINT ["tond"]