forked from forbole/juno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (38 loc) · 1.33 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
# To build the juno image, just run:
# > docker build -t juno .
#
# In order to work properly, this Docker container needs to have a volume that:
# - as source points to a directory which contains a config.yaml file
# - as destination it points to the /home folder
#
# Simple usage with a mounted data directory (considering ~/.juno/config as the configuration folder):
# > docker run -it -v ~/.juno/config:/home juno start --home /home
#
# If you want to run this container as a daemon, you can do so by executing
# > docker run -td -v ~/.juno/config:/home --name juno juno
#
# Once you have done so, you can enter the container shell by executing
# > docker exec -it juno bash
#
# To exit the bash, just execute
# > exit
FROM golang:1.21-alpine AS build-env
# Set up dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev py-pip
# Set working directory for the build
WORKDIR /go/src/github.com/forbole/juno
# Add source files
COPY . .
# Install minimum necessary dependencies, build Cosmos SDK, remove packages
RUN apk update
RUN apk add --no-cache $PACKAGES && \
make install
# Final image
FROM alpine:edge
# Install ca-certificates
RUN apk add --update ca-certificates
WORKDIR /home
# Install bash
RUN apk add --no-cache bash
# Copy over binaries from the build-env
COPY --from=build-env /go/bin/juno /usr/bin/juno