-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSC conversion for REST API #80
Comments
Yes you can. You can use any Ubuntu-based Docker image as your base image in the
Yes. For this, you need to use the
Unfortunately no. But I don't see any specific problems with REST API or with Flask -- I mean, I don't think your problem is about network connectivity. Your problem is most probably with some manifest option that is missing from your minimal So the next step for you:
|
Thanks @dimakuv , please see my responses in the step below my
I made with the
I suspect that there must be more allow files/folders need to be added in the manifest file ? Additionally, would it be possible to add the Thank you for your suggestions Here's the log file |
You can just copy it yourself, if you want to. Something like
The log file has this as the last syscall executed: This is the way to sleep for some time (we can't see for how much time because we only see the pointer to the "time struct", which is at address Other than that, I didn't find anything special in the log... |
That's kind of strange, as my python program given above didn't make any sleep time, or maybe the Flask library does that without my understanding. Anyways, should I include all necessary python libraries in the trusted files of the manifest, just to make sure it can read/write the libraries ? Thank you |
This actually shouldn't be necessary, as GSC does it by itself. If you think that reading/writing some files (libraries) can be a root cause, then you can try |
I've tried with the given manifest option, but it was the same result, the app hanging but not receiving GET request from the curl command. Also recently, when I tried to build new gsc images, there's an error appears:
Do you have any suggestion for this ? (I'm running local python3 version at 3.6.9) |
Please update your GSC to the latest version. We recently made a change to core Gramine and to GSC. |
I tried
|
Hi @llly , |
Since it seems to work, I will close this issue. |
Description of the problem
Unable to convert Flask server docker container using GSC
Steps to reproduce
Hi,
I am trying to do a simple conversion of docker images running Flask server with REST API using GSC but fail, reproduced steps as below
app.py
ubuntu18.04-flask.dockerfile
requirements.txt
Build the docker image
docker build -t ubuntu18.04-flask-demo -f ./ubuntu18.04-flask.dockerfile .
Convert the build (using generic manifest)
./gsc build --insecure-args ubuntu18.04-flask-demo test/generic.manifest
./gsc sign-image ubuntu18.04-flask-demo enclave-key.pem
Run the converted docker
docker run -d --device=/dev/sgx_enclave -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket -p 5000:5000 gsc-ubuntu18.04-flask-demo
Expected results
Calling at localhost should return response
curl localhost:5000
Actual results
The docker container hanging with these logs only
Additional information
Questions:
python:3.7-slim-stretch
) or it has to beubuntu:18.04
and then install python3 in the docker image?docker run
command ? something like this:docker run -p 5000:5000 -it --device=/dev/sgx_enclave -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket gsc-<some-converted-image> '$ARG'
Thanks a lot
The text was updated successfully, but these errors were encountered: