lsds / sgx-lkl

SGX-LKL Library OS for running Linux applications inside of Intel SGX enclaves
MIT License
257 stars 89 forks source link

Use consistent Alpine version in Docker-based tests #260

Open letmaik opened 4 years ago

letmaik commented 4 years ago

sgx-lkl-disk should be extended to accept Docker --build-args, then we can put DOCKER_ALPINE_VERSION=3.10 in tests/common.mk and use that variable in all sgx-lkl-disk invocations in tests. The Dockerfiles of tests can then be changed to FROM alpine:${ALPINE_VERSION}.

letmaik commented 4 years ago

@hukoyu Is this something you could work on? Supporting --build-arg would be quite useful, also outside of testing.

hukoyu commented 4 years ago

Sure @letmaik I will submit a PR for that.

hukoyu commented 4 years ago

Hey @letmaik I need clarification for requirement. Can you share a sample command and expected behavior?

Will this work with --docker or --alpine or both?

I will add --build-arg as far as I understand

Is this a sample valid command: sgx-lkl-disk create --size=100M --docker=./Dockerfile --build-arg=??? sgxlkl-disk.img What is valid values for --build-arg and what is expected behavior? Shall we make change in Dockerfile to override FROM, for example?

letmaik commented 4 years ago

That's only for --docker. Your command is correct. See https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg for syntax of --build-arg. And yes, as I've written, the makefiles and Dockerfiles have to be changed to use the build variable like --build-arg ALPINE_VERSION=3.10 and FROM alpine:${ALPINE_VERSION}, respectively. @prp Is this syntax ok?

letmaik commented 4 years ago

@hukoyu How are you getting on with this? Do you need any help?

hukoyu commented 4 years ago

@letmaik I was busy with other tasks. Will submit a PR for that this week.

hukoyu commented 4 years ago

@letmaik I won't be able to work on that for a while. If you have bandwidth I will appriciate if you take on this task. Thanks.