Skip to content

Commit 393296f

Browse files
committed
🚧 added a shell script to build a containerfile from source
1 parent d90d8d8 commit 393296f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Load variables from the .env file
4+
set -o allexport
5+
source .env
6+
set +o allexport
7+
8+
# Define the path to the Dockerfile
9+
DOCKERFILE_PATH="Dockerfile.guardrails-ai"
10+
11+
# Define the image name and tag
12+
IMAGE_NAME="my-guardrails-app"
13+
TAG="latest"
14+
15+
# Build the Docker image using the specified Dockerfile
16+
podman build \
17+
--no-cache -f $DOCKERFILE_PATH \
18+
--build-arg GUARDRAILS_METRICS=$GUARDRAILS_METRICS \
19+
--build-arg GUARDRAILS_REMOTE_INFERENCING=$GUARDRAILS_REMOTE_INFERENCING \
20+
--build-arg GUARDRAILS_API_KEY=$GUARDRAILS_API_KEY \
21+
-t ${IMAGE_NAME}:${TAG} .

0 commit comments

Comments
 (0)