Skip to content

Commit

Permalink
chore: update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
stulzq committed Apr 4, 2023
1 parent 7b496c4 commit fbcea1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,32 @@ jobs:
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: Login to the GPR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64
push: true
tags: stulzq/azure-openai-proxy:${{ github.event.inputs.tags }}
pull: true
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=Apache-2.0
tags: |
${{ github.repository }}:${{ github.event.inputs.tags }}
# https://docs.docker.com/build/cache/backends/gha/
cache-from: type=gha
cache-to: type=gha,mode=max
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.19 AS building

COPY . /building
WORKDIR /building
COPY . /builder
WORKDIR /builder

RUN make build

Expand All @@ -10,6 +10,6 @@ FROM alpine:3
WORKDIR /app

EXPOSE 8080
COPY --from=building /building/bin .
COPY --from=builder /builder/bin .

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

0 comments on commit fbcea1b

Please sign in to comment.