From cdc8d7cda556d20289d476894849143b3d10ea7f Mon Sep 17 00:00:00 2001 From: Zhiqiang Li Date: Fri, 24 Mar 2023 16:14:56 +0800 Subject: [PATCH] feat: add build sh and dockerfile --- Dockerfile | 5 +++++ build.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 Dockerfile create mode 100644 build.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ebea5ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3 + +COPY ./bin/azure-openai-proxy /usr/bin + +ENTRYPOINT ["/usr/bin/azure-openai-proxy"] \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..3e470cd --- /dev/null +++ b/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +VERSION=v1.0.0 + +rm -rf bin + +export GOOS=linux +export GOARCH=amd64 +go build -trimpath -ldflags "-s -w" -o bin/azure-openai-proxy ./cmd + +docker build -t stulzq/azure-openai-proxy:$VERSION . \ No newline at end of file