Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions templates/base/build.dev.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defaultBuildLogger, Template } from '../../packages/js-sdk/src'
import { template, alias } from './template'

await Template.build(template, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the base template is already built in the Infra repo. I think we might want to have here only the Docker image build, no template at all

alias: `${alias}-dev`,
onBuildLogs: defaultBuildLogger(),
})
7 changes: 7 additions & 0 deletions templates/base/build.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defaultBuildLogger, Template } from '../../packages/js-sdk/src'
import { template, alias } from './template'

await Template.build(template, {
alias,
onBuildLogs: defaultBuildLogger(),
})
3 changes: 1 addition & 2 deletions templates/base/e2b.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
gh; \
rm -rf /var/lib/apt/lists/*

RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
RUN groupadd -r node && useradd -r -g node -s /bin/bash -m node
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was edited because I was getting:

groupadd: GID '1000' already exists


ENV NODE_VERSION 20.9.0

Expand Down
17 changes: 0 additions & 17 deletions templates/base/e2b.toml

This file was deleted.

10 changes: 10 additions & 0 deletions templates/base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "e2bdev/base",
"version": "1.0.0",
"description": "E2B Base Template",
"scripts": {
"build:dev": "tsx build.dev.ts",
"build:prod": "tsx build.prod.ts",
"build": "tsx build.prod.ts"
}
}
4 changes: 4 additions & 0 deletions templates/base/template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Template } from '../../packages/js-sdk/src'

export const alias = 'base'
export const template = Template().fromDockerfile('e2b.Dockerfile')