forked from RyanHendricks/docker-cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (37 loc) · 1.31 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
FROM golang:1.18-alpine AS buildenv
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
ENV VERSION v7.0.3
# Set up dependencies
RUN apk add --update --no-cache $PACKAGES
# Set working directory for the build
WORKDIR /go/src/github.com/cosmos/
# Add source files
RUN git clone --recursive https://www.github.com/cosmos/gaia
WORKDIR /go/src/github.com/cosmos/gaia
RUN git checkout $VERSION
RUN make install
# ------------------------------------------------------------------ #
FROM alpine:edge
ENV GAIAD_HOME=/.gaiad
# Install ca-certificates
RUN apk add --no-cache --update ca-certificates py3-setuptools supervisor wget lz4 gzip
# Temp directory for copying binaries
RUN mkdir -p /tmp/bin
WORKDIR /tmp/bin
COPY --from=buildenv /go/bin/gaiad /tmp/bin
RUN install -m 0755 -o root -g root -t /usr/local/bin gaiad
# Remove temp files
RUN rm -r /tmp/bin
# Add supervisor configuration files
RUN mkdir -p /etc/supervisor/conf.d/
COPY /supervisor/supervisord.conf /etc/supervisor/supervisord.conf
COPY /supervisor/conf.d/* /etc/supervisor/conf.d/
WORKDIR $GAIAD_HOME
# Expose ports
EXPOSE 26656 26657 26658
EXPOSE 1317
# Add entrypoint script
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
STOPSIGNAL SIGINT