From e0eaf8afcabaf1bd40e38aa151cb95b88f1cf539 Mon Sep 17 00:00:00 2001 From: Jonathan Ingram Date: Tue, 20 Sep 2022 15:26:29 +1000 Subject: [PATCH] docd: fix Dockerfile after change to Go 1.19 (#124) --- .github/workflows/docd.yml | 47 +++++++++++++++++++------------------- docd/Dockerfile | 9 ++++---- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/docd.yml b/.github/workflows/docd.yml index 9999e74..49ea553 100644 --- a/.github/workflows/docd.yml +++ b/.github/workflows/docd.yml @@ -10,26 +10,27 @@ jobs: name: Publish Docker image runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - id: meta - uses: docker/metadata-action@v3 - with: - images: sajari/docd - labels: | - org.opencontainers.image.description=A tool which exposes code.sajari.com/docconv as a service - org.opencontainers.image.title=docd - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha,format=long - - uses: docker/build-push-action@v2 - with: - context: docd - labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} - push: true + - uses: actions/checkout@v2 + - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - id: meta + uses: docker/metadata-action@v3 + with: + images: sajari/docd + labels: | + org.opencontainers.image.description=A tool which exposes code.sajari.com/docconv as a service + org.opencontainers.image.title=docd + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha,format=long + - uses: docker/build-push-action@v2 + with: + context: . + file: docd/Dockerfile + labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + push: true diff --git a/docd/Dockerfile b/docd/Dockerfile index fc42a2e..0361b4f 100644 --- a/docd/Dockerfile +++ b/docd/Dockerfile @@ -1,9 +1,8 @@ FROM golang:1.19 AS build -WORKDIR /go/src/github.com/sajari/docconv/docd -COPY main.go . -RUN go get -v ./ -RUN go build . +WORKDIR /app +COPY . ./ +RUN go build ./docd/... ################################################################################ @@ -22,6 +21,6 @@ RUN apt-get update \ EXPOSE 8888 -COPY --from=build /go/bin/docd /docd +COPY --from=build /app/docd /docd ENTRYPOINT ["/docd"] CMD ["--help"]