Skip to content

Commit

Permalink
feat: add build docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stulzq committed Mar 30, 2023
1 parent b368fe2 commit 013b929
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Image

on:
push:
branches:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: stulzq/azure-openai-proxy:latest
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
FROM golang:1.19 AS building

COPY . /building
WORKDIR /building

RUN make build

FROM alpine:3

WORKDIR /app

EXPOSE 8080
COPY ./bin/azure-openai-proxy /usr/bin
COPY --from=building /building/bin .

ENTRYPOINT ["/usr/bin/azure-openai-proxy"]
ENTRYPOINT ["/app/azure-openai-proxy"]

0 comments on commit 013b929

Please sign in to comment.