forked from akash-network/cosmos-omnibus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (48 loc) · 1.43 KB
/
Dockerfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM golang:1.16-buster AS build
RUN apt-get update && \
apt-get install --no-install-recommends --assume-yes curl unzip && \
apt-get clean
FROM build AS aws
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip -d /usr/src
FROM build AS project
ARG PROJECT=dig
ARG PROJECT_BIN=digd
ARG REPOSITORY=https://github.com/faddat/dig
# Clone and build project
RUN git clone $REPOSITORY /data
WORKDIR /data
RUN cd dig
RUN go mod tidy
RUN cd cmd/digd
RUN go install .
RUN mv $GOPATH/bin/$PROJECT_BIN /bin/$PROJECT_BIN
FROM debian:buster
RUN apt-get update && \
apt-get install --no-install-recommends --assume-yes ca-certificates curl wget file unzip gnupg2 jq && \
apt-get clean
ARG PROJECT=dig
ARG PROJECT_BIN=digd
ARG PROJECT_DIR=.dig
ARG WASMVM_VERSION=main
ARG REPOSITORY=https://github.com/faddat/dig
ARG NAMESPACE
ENV PROJECT=$PROJECT
ENV PROJECT_BIN=$PROJECT_BIN
ENV PROJECT_DIR=$PROJECT_DIR
ENV REPOSITORY=$REPOSITORY
ENV NAMESPACE=$NAMESPACE
ENV MONIKER=my-omnibus-node
EXPOSE 26656 \
26657 \
1317 \
9090 \
8080
COPY --from=project /bin/$PROJECT_BIN /bin/$PROJECT_BIN
COPY --from=aws /usr/src/aws /usr/src/aws
RUN /usr/src/aws/install --bin-dir /usr/bin
ADD https://raw.githubusercontent.com/CosmWasm/wasmvm/$WASMVM_VERSION/api/libwasmvm.so /lib/libwasmvm.so
COPY run.sh /usr/bin/
RUN chmod +x /usr/bin/run.sh
ENTRYPOINT ["run.sh"]
CMD $PROJECT_BIN start