Fix doc typo
Added a few files to test the affected test. Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
31
docs/tests/core-concepts/container-images/simple/build.cue
Normal file
31
docs/tests/core-concepts/container-images/simple/build.cue
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"universe.dagger.io/docker"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "./src": read: contents: dagger.#FS
|
||||
|
||||
actions: build: docker.#Build & {
|
||||
steps: [
|
||||
docker.#Pull & {
|
||||
source: "python:3.9"
|
||||
},
|
||||
docker.#Copy & {
|
||||
contents: client.filesystem."./src".read.contents
|
||||
dest: "/app"
|
||||
},
|
||||
docker.#Run & {
|
||||
command: {
|
||||
name: "pip"
|
||||
args: ["install", "-r", "/app/requirements.txt"]
|
||||
}
|
||||
},
|
||||
docker.#Set & {
|
||||
config: cmd: ["python", "/app/app.py"]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
print("Hello world!")
|
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "./src": read: contents: dagger.#FS
|
||||
|
||||
actions: build: dagger.#Dockerfile & {
|
||||
// This is the context.
|
||||
source: client.filesystem."./src".read.contents
|
||||
|
||||
// Default is to look for a Dockerfile in the context,
|
||||
// but let's declare it here.
|
||||
dockerfile: contents: #"""
|
||||
FROM python:3.9
|
||||
COPY . /app
|
||||
RUN pip install -r /app/requirements.txt
|
||||
CMD python /app/app.py
|
||||
|
||||
"""#
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user