build scripts
This commit is contained in:
parent
331788fb6e
commit
1da6053acf
@ -17,6 +17,7 @@ COPY --from=build /opt/occlum/build/bin/occlum-run /opt/occlum/build/bin/occlum-
|
||||
COPY --from=build /opt/occlum/build/bin/occlum /usr/bin/occlum
|
||||
COPY --from=build /sgx_libs /sgx_libs
|
||||
RUN cp /sgx_libs/* /usr/lib/x86_64-linux-gnu/
|
||||
RUN tar -xzf /challenge.tar.gz && cp /challenge.sh /challenge/challenge.sh
|
||||
|
||||
WORKDIR /
|
||||
ENTRYPOINT ["/challenge.sh"]
|
||||
WORKDIR /challenge
|
||||
ENTRYPOINT ["/challenge/challenge.sh"]
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
# This script is the entrypoint of the challenge container
|
||||
|
||||
tar -xzf challenge.tar.gz && cd challenge
|
||||
|
||||
if [ -z "${INIT_NODES}" ]; then
|
||||
echo "The INIT_NODES environment variable is not set."
|
||||
else
|
||||
|
@ -14,7 +14,7 @@ fi
|
||||
|
||||
cd docker
|
||||
cp ../challenge_instance/challenge.tar.gz challenge.tar.gz
|
||||
docker build -f challenge.Dockerfile -t hacker-challenge:latest .
|
||||
docker build -f challenge.Dockerfile -t detee/hacker-challenge:latest .
|
||||
cd ..
|
||||
|
||||
echo "Container named 'hacker-challenge' built"
|
||||
|
@ -41,7 +41,7 @@ echo "Waiting for the network root to start"
|
||||
docker run --device /dev/sgx/enclave \
|
||||
--device /dev/sgx/provision \
|
||||
--name "hacker-challenge" \
|
||||
-d hacker-challenge:latest
|
||||
-d detee/hacker-challenge:latest
|
||||
while true; do
|
||||
echo -n "." && sleep 1
|
||||
docker logs hacker-challenge | grep -q "SOL" && echo && break
|
||||
@ -62,7 +62,7 @@ for p in {31311..31320}; do
|
||||
--env INIT_NODES="172.17.0.2 172.17.0.3 172.17.0.4" \
|
||||
-v "/tmp/hacker-challenge${p}:/challenge/main" \
|
||||
--name "hacker-challenge${p}" -p "${p}:31372" \
|
||||
-d hacker-challenge:latest
|
||||
-d detee/hacker-challenge:latest
|
||||
done
|
||||
sleep 15 # Wait for the cluster to start
|
||||
|
||||
|
@ -26,7 +26,7 @@ pub struct NodeInfo {
|
||||
|
||||
impl NodeInfo {
|
||||
pub fn is_newer_than(&self, older_self: &Self) -> bool {
|
||||
self > older_self
|
||||
self.keepalive > older_self.keepalive
|
||||
}
|
||||
|
||||
pub fn to_json(&self) -> String {
|
||||
|
Loading…
Reference in New Issue
Block a user