-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (38 loc) · 1.41 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 soljuno image, just run:
# > docker build -t soljuno .
#
# In order to work properly, this Docker container needs to have a volume that:
# - as source points to a directory which contains a config.toml and firebase-config.toml files
# - as destination it points to the /home folder
#
# Simple usage with a mounted data directory (considering ~/.soljuno/config as the configuration folder):
# > docker run -it -v ~/.soljuno/config:/home soljuno soljuno parse config.toml firebase-config.json
#
# If you want to run this container as a daemon, you can do so by executing
# > docker run -td -v ~/.soljuno/config:/home --name soljuno soljuno
#
# Once you have done so, you can enter the container shell by executing
# > docker exec -it soljuno bash
#
# To exit the bash, just execute
# > exit
FROM golang: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/soljuno
# 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/soljuno /usr/bin/soljuno