chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:58 +08:00
commit b16403ea71
789 changed files with 115226 additions and 0 deletions
@@ -0,0 +1,15 @@
import asyncio
from e2b import AsyncTemplate, default_build_logger
from template import template
async def main():
await AsyncTemplate.build(
template,
"custom-app-dev",
on_build_logs=default_build_logger(),
)
if __name__ == "__main__":
asyncio.run(main())
@@ -0,0 +1,15 @@
import asyncio
from e2b import AsyncTemplate, default_build_logger
from template import template
async def main():
await AsyncTemplate.build(
template,
"custom-app",
on_build_logs=default_build_logger(),
)
if __name__ == "__main__":
asyncio.run(main())
@@ -0,0 +1,12 @@
from e2b import AsyncTemplate
template = (
AsyncTemplate()
.from_image("node:18")
.set_user("root")
.set_workdir("/")
.set_workdir("/app")
.copy("server.js", ".")
.set_user("user")
.set_start_cmd("sudo node server.js", "curl -f http://localhost:3000/health || exit 1")
)
@@ -0,0 +1,10 @@
from e2b import Template, default_build_logger
from template import template
if __name__ == "__main__":
Template.build(
template,
"custom-app-dev",
on_build_logs=default_build_logger(),
)
@@ -0,0 +1,10 @@
from e2b import Template, default_build_logger
from template import template
if __name__ == "__main__":
Template.build(
template,
"custom-app",
on_build_logs=default_build_logger(),
)
@@ -0,0 +1,12 @@
from e2b import Template
template = (
Template()
.from_image("node:18")
.set_user("root")
.set_workdir("/")
.set_workdir("/app")
.copy("server.js", ".")
.set_user("user")
.set_start_cmd("sudo node server.js", "curl -f http://localhost:3000/health || exit 1")
)
@@ -0,0 +1,10 @@
import { Template, defaultBuildLogger } from 'e2b'
import { template } from './template'
async function main() {
await Template.build(template, 'custom-app-dev', {
onBuildLogs: defaultBuildLogger(),
});
}
main().catch(console.error);
@@ -0,0 +1,10 @@
import { Template, defaultBuildLogger } from 'e2b'
import { template } from './template'
async function main() {
await Template.build(template, 'custom-app', {
onBuildLogs: defaultBuildLogger(),
});
}
main().catch(console.error);
@@ -0,0 +1,10 @@
import { Template } from 'e2b'
export const template = Template()
.fromImage('node:18')
.setUser('root')
.setWorkdir('/')
.setWorkdir('/app')
.copy('server.js', '.')
.setUser('user')
.setStartCmd('sudo node server.js', 'curl -f http://localhost:3000/health || exit 1')