Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM ubuntu:latest
  2. RUN apt-get update -y
  3. RUN apt-get install -y curl git xz-utils jq moreutils
  4. # Prepare directory to host radicle binaries
  5. RUN mkdir -p /usr/local/{bin,man,man/man1}
  6. RUN chown ubuntu: /usr/local/{bin,man,man/man1}
  7. # Install rad and radicle-node
  8. RUN curl -v -o "/tmp/radicle.tar.xz" -L "https://files.radicle.xyz/releases/latest/radicle-x86_64-unknown-linux-musl.tar.xz"
  9. RUN tar -C "/usr/local" --strip-components=1 -xf "/tmp/radicle.tar.xz"
  10. RUN rm "/tmp/radicle.tar.xz"
  11. # Install radicle-httpd
  12. RUN curl -v -o "/tmp/radicle-httpd.tar.xz" -L "https://files.radicle.xyz/releases/radicle-httpd/latest/radicle-x86_64-unknown-linux-musl.tar.xz"
  13. RUN tar -C "/usr/local" --strip-components=1 -xf "/tmp/radicle-httpd.tar.xz"
  14. RUN rm "/tmp/radicle-httpd.tar.xz"
  15. # Prepare scripts
  16. COPY start_radicle.sh "/home/ubuntu/start_radicle.sh"
  17. COPY probe_radicle.sh "/home/ubuntu/probe_radicle.sh"
  18. RUN chmod u+x "/home/ubuntu/start_radicle.sh"
  19. RUN chown "ubuntu:" "/home/ubuntu/start_radicle.sh"
  20. # Prepare storage directories
  21. RUN mkdir /home/ubuntu/radicle
  22. RUN chown ubuntu /home/ubuntu/radicle
  23. USER ubuntu
  24. WORKDIR /home/ubuntu
  25. ENV RAD_HOME=/home/ubuntu/radicle
  26. VOLUME /home/ubuntu/radicle
  27. ENTRYPOINT /home/ubuntu/start_radicle.sh