Skip to content

Commit

Permalink
Merge pull request #188 from ava-labs/update-release-dockerfile
Browse files Browse the repository at this point in the history
Update release Dockerfile
  • Loading branch information
cam-schultz authored Feb 20, 2024
2 parents d221fd7 + eeeea4b commit bdf7343
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ jobs:
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERFILE: ./Dockerfile.release
GO_VERSION: ${{ env.GO_VERSION }}
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ builds:
dockers:
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-amd64'
dockerfile: "{{ .Env.DOCKERFILE }}"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--build-arg=GO_VERSION={{ .Env.GO_VERSION }}"
- image_templates:
- 'avaplatform/awm-relayer:{{ .Tag }}-arm64'
dockerfile: "{{ .Env.DOCKERFILE }}"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--build-arg=GO_VERSION={{ .Env.GO_VERSION }}"
goarch: arm64
docker_manifests:
- name_template: 'avaplatform/awm-relayer:{{ .Tag }}'
Expand Down
16 changes: 2 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
### Build Stage ###
ARG GO_VERSION
FROM golang:${GO_VERSION}-bullseye as build

WORKDIR /go/src
# Copy the code into the container
COPY . .
RUN go mod tidy
# Build awm-relayer
RUN bash ./scripts/build.sh

### RUN Stage ###
ARG GO_VERSION
FROM golang:${GO_VERSION}
COPY --from=build /go/src/build/awm-relayer /usr/bin/awm-relayer
COPY awm-relayer /usr/bin/awm-relayer
EXPOSE 8080
USER 1001
CMD ["start"]
ENTRYPOINT ["/usr/bin/awm-relayer"]
ENTRYPOINT [ "/usr/bin/awm-relayer" ]
3 changes: 0 additions & 3 deletions Dockerfile.release

This file was deleted.

0 comments on commit bdf7343

Please sign in to comment.