# declare the app entrypoint
ENTRYPOINT="node /app/app.js"
IMG_NAME=nodejs-hello-world
IMG_FROM=${IMG_NAME}:temp-non-tee
IMG_TO=${IMG_NAME}:tee-debug
# build the regular non-TEE image
docker build . -t ${IMG_FROM}
# pull the SCONE curated image corresponding to our base image
docker pull registry.scontain.com:5050/sconecuratedimages/node:14.4.0-alpine3.11
# run the sconifier to build the TEE image based on the non-TEE image
-v /var/run/docker.sock:/var/run/docker.sock \
registry.scontain.com:5050/scone-production/iexec-sconify-image:5.3.15 \
--host-path=/etc/resolv.conf \
--binary=/usr/local/bin/node \
--command=${ENTRYPOINT} \
&& echo -e "\n------------------\n" \
&& echo "successfully built TEE docker image => ${IMG_TO}" \
&& echo "application mrenclave.fingerprint is $(docker run -it --rm -e SCONE_HASH=1 ${IMG_TO})"