Skip to content
Init is coming / May 19 - 23
Back

Spin up a docker container inside appwrite function.

  • 0
  • Self Hosted
  • Functions
  • Web
kunxl.gg
8 Jun, 2023, 17:52

I am attaching a code snippet here. Is it possible to run this on appwrite

TL;DR
The OP was asking if a file saved in the file system during an Appwrite function will be saved once the function is over. The solution is to use Appwrite storage module to create and use files to mitigate this issue. Another option is to treat each function run as a fresh start. The OP also shared a code snippet and asked if it can be run on Appwrite. The response was that running the code inside an isolated open-runtime environment with no access to the Docker socket is not possible.
Binyamin
8 Jun, 2023, 17:53

Don't think so As your function will run inside an isolated open-runtime environment with no access to any Docker socket.

kunxl.gg
9 Jun, 2023, 01:55

F

kunxl.gg
9 Jun, 2023, 01:58

Ok so i have a question

kunxl.gg
9 Jun, 2023, 01:59

If i run an appwrite function and save a file in the file system of the isolated run time given by appwrite. Once the function is over will that file be saved

kunxl.gg
9 Jun, 2023, 01:59

Or once the function is over it's a fresh start

Binyamin
9 Jun, 2023, 02:15

The file will be saved as long as the function run time is active. Once the function threshold is over - usually up to 61 minutes - them the container will get delete and that's include all the files you've created in the process.

To mitigate this issue it's recommand to create and use file using Appwrite storage module

kunxl.gg
10 Jun, 2023, 15:24

thank you for your help. I found a solution

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more