-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
40 lines (34 loc) · 1.25 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
FROM likecoin/rbuilder:go1.19.5 as builder
USER root
ARG LIKED_VERSION=unknown
ARG LIKED_COMMIT=unknown
WORKDIR /cosmovisor
RUN wget https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-amd64.tar.gz
RUN tar -xzvf cosmovisor-v1.5.0-linux-amd64.tar.gz
USER builder
COPY . /sources
WORKDIR /sources
RUN git config --global --add safe.directory /sources
ENV TARGET_PLATFORMS='linux/amd64'
ENV APP='liked'
ENV LEDGER_ENABLED=true
ENV VERSION=$LIKED_VERSION
ENV COMMIT=$LIKED_COMMIT
RUN rm -rf /sources/artifacts
RUN /bin/bash -c /sources/.build.sh
FROM debian:bullseye
RUN groupadd --gid 1000 likechain \
&& useradd --uid 1000 --gid likechain --shell /bin/bash likechain
WORKDIR /likechain
RUN mkdir -p /likechain/.liked/cosmovisor/genesis/bin
RUN chown -R likechain:likechain /likechain
RUN chmod -R g+w /likechain
ENV DAEMON_NAME liked
ENV DAEMON_HOME /likechain/.liked
ENV DAEMON_ALLOW_DOWNLOAD_BINARIES true
ENV DAEMON_RESTART_AFTER_UPGRADE true
RUN apt-get update && apt-get install -y curl
COPY --from=builder /cosmovisor/cosmovisor /usr/bin/cosmovisor
COPY --from=builder ./home/builder/artifacts/liked-*-linux-amd64 /usr/bin/liked
USER likechain:likechain
RUN cp /usr/bin/liked /likechain/.liked/cosmovisor/genesis/bin/liked