Build from a Dockerfile
curl --request POST \
--url https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"dockerfile": "<string>",
"contextHash": "<string>",
"startCmd": "<string>",
"noCache": true
}
'import requests
url = "https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile"
payload = {
"dockerfile": "<string>",
"contextHash": "<string>",
"startCmd": "<string>",
"noCache": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dockerfile: '<string>',
contextHash: '<string>',
startCmd: '<string>',
noCache: true
})
};
fetch('https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Templates
Build from a Dockerfile
Starts a build from a Dockerfile and a build context uploaded through
the E2B file links, instead of E2B’s step list. This is what
anona-compute template build uses.
POST
/
v1
/
templates
/
{templateID}
/
builds
/
{buildID}
/
dockerfile
Build from a Dockerfile
curl --request POST \
--url https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"dockerfile": "<string>",
"contextHash": "<string>",
"startCmd": "<string>",
"noCache": true
}
'import requests
url = "https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile"
payload = {
"dockerfile": "<string>",
"contextHash": "<string>",
"startCmd": "<string>",
"noCache": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dockerfile: '<string>',
contextHash: '<string>',
startCmd: '<string>',
noCache: true
})
};
fetch('https://api.compute.anonalabs.com/v1/templates/{templateID}/builds/{buildID}/dockerfile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
An Anona Compute API key (e2b_ followed by lowercase hex).
Body
application/json
Response
The build was queued.