Skip to content

Instantly share code, notes, and snippets.

@spac3unit
Last active November 19, 2021 19:52
Show Gist options
  • Save spac3unit/b0734203efb188933ba41278e1249d0b to your computer and use it in GitHub Desktop.
Save spac3unit/b0734203efb188933ba41278e1249d0b to your computer and use it in GitHub Desktop.
Idena docker
{ "IpfsConf":
{ "Profile": "server" }
}
version: "3.5"
services:
idena:
container_name: idena
image: scrooge/idena:latest
restart: always
ports:
- "9090:9009"
volumes:
- /root/.idena/data:/home/datadir
- /root/.idena/config.json:/home/config.json
entrypoint:
- idena
- --rpcaddr
- 0.0.0.0
- --config
- /home/config.json
# Sample usage with a mounted data directory and fast sync:
# > docker build --tag idena .
# > docker run --network host --volume ~/.idena/datadir:/home/datadir idena --fast
FROM ubuntu AS builder
WORKDIR /home
RUN apt-get update && \
apt-get install -y jq wget
RUN wget https://api.github.com/repos/idena-network/idena-go/releases/latest
RUN wget -O "./idena" $(jq --raw-output '.assets | map(select(.name | startswith("idena-node-linux"))) | .[0].browser_download_url' "./latest")
FROM ubuntu
WORKDIR /home
COPY --from=builder /home/ .
RUN chmod +x "./idena"
RUN mv ./idena /usr/bin
ENTRYPOINT ["idena"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment