diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bf29d1e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +docs/ +dist/ +.github/ + +.dockerignore +.gitignore + +Makefile +README.md +LICENSE diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 43d05e7..1bd2d9c 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -26,3 +26,11 @@ jobs: run: sqlc vet - name: Diff run: sqlc diff + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/build-push-action@v5 + with: + context: . + push: false diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..994eef3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.22 + +WORKDIR /app + +COPY . . + +ENV CGO_ENABLED=0 +RUN go build -o /bin/eryth ./cmd + +FROM scratch + +COPY --from=0 /bin/eryth /bin/eryth + +ENTRYPOINT ["eryth"] \ No newline at end of file