|
@@ -0,0 +1,38 @@
|
|
|
|
+FROM ubuntu:latest
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+RUN apt-get update -y
|
|
|
|
+RUN apt-get install -y curl git xz-utils jq moreutils
|
|
|
|
+
|
|
|
|
+# Prepare directory to host radicle binaries
|
|
|
|
+RUN mkdir -p /usr/local/{bin,man,man/man1}
|
|
|
|
+RUN chown ubuntu: /usr/local/{bin,man,man/man1}
|
|
|
|
+
|
|
|
|
+# Install rad and radicle-node
|
|
|
|
+RUN curl -v -o "/tmp/radicle.tar.xz" -L "https://files.radicle.xyz/releases/latest/radicle-x86_64-unknown-linux-musl.tar.xz"
|
|
|
|
+RUN tar -C "/usr/local" --strip-components=1 -xf "/tmp/radicle.tar.xz"
|
|
|
|
+RUN rm "/tmp/radicle.tar.xz"
|
|
|
|
+
|
|
|
|
+# Install radicle-httpd
|
|
|
|
+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"
|
|
|
|
+RUN tar -C "/usr/local" --strip-components=1 -xf "/tmp/radicle-httpd.tar.xz"
|
|
|
|
+RUN rm "/tmp/radicle-httpd.tar.xz"
|
|
|
|
+
|
|
|
|
+# Prepare scripts
|
|
|
|
+COPY start_radicle.sh "/home/ubuntu/start_radicle.sh"
|
|
|
|
+COPY probe_radicle.sh "/home/ubuntu/probe_radicle.sh"
|
|
|
|
+RUN chmod u+x "/home/ubuntu/start_radicle.sh"
|
|
|
|
+RUN chown "ubuntu:" "/home/ubuntu/start_radicle.sh"
|
|
|
|
+
|
|
|
|
+# Prepare storage directories
|
|
|
|
+RUN mkdir /home/ubuntu/radicle
|
|
|
|
+RUN chown ubuntu /home/ubuntu/radicle
|
|
|
|
+
|
|
|
|
+USER ubuntu
|
|
|
|
+WORKDIR /home/ubuntu
|
|
|
|
+
|
|
|
|
+ENV RAD_HOME=/home/ubuntu/radicle
|
|
|
|
+
|
|
|
|
+VOLUME /home/ubuntu/radicle
|
|
|
|
+
|
|
|
|
+ENTRYPOINT /home/ubuntu/start_radicle.sh
|