threefoldtech / 0-hub

Threefold Images Hub
https://hub.grid.tf
Apache License 2.0
1 stars 1 forks source link

Add ENV to .tar.gz files #58

Closed 0oM4R closed 1 year ago

0oM4R commented 1 year ago

while uploading .tar.gz file to create its flist, the ENVs that are declared in the image and the base image, not accessible in the flist which causes boot errors in the deployment. so what is the step that includes the ENV in the tar file as in the docker converter https://github.com/threefoldtech/0-hub/blob/b924e924f950f0afb905e878838a3475efa24ffe/python/hub/docker.py#L141

maxux commented 1 year ago

Just write your stuff in /.startup.toml like docker module does for you for docker.

0oM4R commented 1 year ago

Is this the only way to include them? some images like Postgres have a lot of ENV that should be in the base image, for example, if I'm building a Postgres image from Postgres:latest, I have no idea what is the ENv that it has, should I check the repo of that and manually get its ENV to toml file?

maxux commented 1 year ago

You can run a local docker environment and check using docker inspect to see which environment are set.

The playground hub supports metadata which would be the next-gen way to include stuff like envs, but it's not yet in production nor even used by zos/0-fs for now and it's not on top priorities right now :(