Skip to content

Commit

Permalink
fix: alpine dynamic link issue
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Aug 27, 2023
1 parent d3dd96f commit c99c42d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_push_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
go-version: '1.21'
- name: Build
run: mkdir -p ./temp && go build -o ./temp/linux_amd64/hitokoto_reviewer ./main.go
run: mkdir -p ./temp && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o ./temp/linux_amd64/hitokoto_reviewer main.go
-
name: Build and push
uses: docker/build-push-action@v4
Expand Down
3 changes: 1 addition & 2 deletions manifest/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM alpine:3.18
###############################################################################
# INSTALLATION
###############################################################################

ENV WORKDIR /app
ADD resource $WORKDIR/
ADD ./temp/linux_amd64/hitokoto_reviewer $WORKDIR/hitokoto_reviewer
Expand All @@ -13,4 +12,4 @@ RUN chmod +x $WORKDIR/hitokoto_reviewer
# START
###############################################################################
WORKDIR $WORKDIR
ENTRYPOINT ["sh"]
CMD ["./hitokoto_reviewer"]

0 comments on commit c99c42d

Please sign in to comment.