Skip to content

Commit

Permalink
add dockerfile + gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-0 committed Sep 27, 2024
1 parent 77e069d commit 40d4289
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/service-extensions-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Service Extensions Callout images packages

# on push in the PR branch
on:
push:
branches:
- 'flavien/service-extensions'

jobs:
publish-service-extensions:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.22
id: go

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
shell: bash
run: docker login -u publisher -p ${{ secrets.GITHUB_TOKEN }} ghcr.io

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./contrib/envoyproxy/envoy/cmd/serviceextensions/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ github.repository_owner }}/service-extensions-callout:latest


15 changes: 15 additions & 0 deletions contrib/envoyproxy/envoy/cmd/serviceextensions/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Build stage
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o serviceextensions ./contrib/envoyproxy/envoy/cmd/serviceextensions

# Runtime stage
FROM alpine:3.20.3
WORKDIR /app
COPY --from=builder /app/contrib/envoyproxy/envoy/cmd/serviceextensions/serviceextensions /app/serviceextensions

EXPOSE 80
EXPOSE 443

CMD ["./serviceextensions"]

0 comments on commit 40d4289

Please sign in to comment.