-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Allow users to bring their own Dockerfile (#773)
Resolve BE-2084 This feature adds a new operator to the `Image` abstraction that allows users to specify a path to a Dockerfile that they wish to use as the base of their Image. We use `buildah` and `umoci` to build their Dockerfile and gather the bundle needed to run it. It can be used as follows: ```python from beta9 import Image, endpoint image = Image().from_dockerfile("./Dockerfile").add_python_packages(["numpy"]) @endpoint(image=image, name="test_dockerfile") def handler(): return "pass" ``` Where `./Dockerfile` is: ``` FROM ubuntu:22.04 RUN echo hello ENV FOO=bar ``` Note: when testing locally, you might need to build gateway again to get `make start` to work because the go version is bumped.
- Loading branch information
1 parent
3dda0e3
commit 44e21d8
Showing
19 changed files
with
784 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22-bullseye AS base | ||
FROM golang:1.23.4-bullseye AS base | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends fuse3 | ||
|
@@ -25,7 +25,7 @@ FROM base AS build | |
|
||
WORKDIR /workspace | ||
|
||
RUN apt-get install -y libfuse3-dev && \ | ||
RUN apt-get install -y libfuse3-dev libbtrfs-dev libgpgme-dev && \ | ||
go install github.com/cosmtrek/[email protected] | ||
|
||
COPY go.mod go.sum ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.