Jelajahi Sumber

Added passkey env variable, env can be set with docker run, updated fah client, and switched to cenots:7

Spencer Gardner 7 tahun lalu
induk
melakukan
b1e1942f56
3 mengubah file dengan 15 tambahan dan 8 penghapusan
  1. 9 7
      Dockerfile
  2. 1 1
      config.xml
  3. 5 0
      run.sh

+ 9 - 7
Dockerfile

@@ -6,20 +6,22 @@
 
 # Set environment variables USERNAME, TEAM, and POWER to customize your Folding client.
 
-FROM fedora
+FROM centos:7
 
 # If you set USERNAME to Anonymous, the folding@home client pauses for 5 minutes, but will then begin processing data.
-ENV USERNAME Anonymous
-ENV TEAM 0
-ENV POWER medium
+ENV USERNAME snppla
+ENV TEAM 224497
+ENV POWER full
+ENV PASSKEY=
 
 # Install updates
 RUN yum update -y
 
 # Install Folding@home
-RUN rpm -i https://fah.stanford.edu/file-releases/public/release/fahclient/centos-5.3-64bit/v7.3/fahclient-7.3.6-1.x86_64.rpm
+RUN rpm -i https://folding.stanford.edu/releases/public/release/fahclient/centos-5.3-64bit/v7.4/fahclient-7.4.4-1.x86_64.rpm
 ADD config.xml /etc/fahclient/
+ADD run.sh /run.sh
 RUN chown fahclient:root /etc/fahclient/config.xml
-RUN sed -i -e "s/{{USERNAME}}/$USERNAME/;s/{{TEAM}}/$TEAM/;s/{{POWER}}/$POWER/" /etc/fahclient/config.xml
 
-CMD /etc/init.d/FAHClient start && tail -F /var/lib/fahclient/log.txt
+CMD /run.sh
+

+ 1 - 1
config.xml

@@ -1,7 +1,7 @@
 <config>
   <user value="{{USERNAME}}"/>
   <team value="{{TEAM}}"/>
-  <passkey value=""/>
+  <passkey value="{{PASSKEY}}"/>
 
   <power value="{{POWER}}"/>
   <gpu value="false"/>

+ 5 - 0
run.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sed -i -e "s/{{USERNAME}}/$USERNAME/;s/{{TEAM}}/$TEAM/;s/{{POWER}}/$POWER/;s/{{PASSKEY}}/$PASSKEY/" /etc/fahclient/config.xml
+
+/etc/init.d/FAHClient start && tail -F /var/lib/fahclient/log.txt