diff --git a/Makefile b/Makefile index 1df5b33..8ae2c48 100644 --- a/Makefile +++ b/Makefile @@ -31,23 +31,23 @@ build: tools/%: go build -gcflags="-trimpath=${HOME}" -ldflags="-w" test/tools/$*/$*.go -docker: clean packages +docker-build: # clean packages mv dist/Gunfish_linux_amd64_v1 dist/Gunfish_linux_amd64 docker buildx build \ - --build-arg VERSION=v${GIT_VER} \ + --build-arg VERSION=${GIT_VER} \ --platform linux/amd64,linux/arm64 \ -f docker/Dockerfile \ - -t kayac/gunfish:v${GIT_VER} \ - -t ghcr.io/kayac/gunfish:v${GIT_VER} \ + -t kayac/gunfish:${GIT_VER} \ + -t ghcr.io/kayac/gunfish:${GIT_VER} \ . docker-push: mv dist/Gunfish_linux_amd64_v1 dist/Gunfish_linux_amd64 docker buildx build \ - --build-arg VERSION=v${GIT_VER} \ + --build-arg VERSION=${GIT_VER} \ --platform linux/amd64,linux/arm64 \ -f docker/Dockerfile \ - -t katsubushi/katsubushi:v${GIT_VER} \ - -t ghcr.io/kayac/gunfish:v${GIT_VER} \ + -t katsubushi/katsubushi:${GIT_VER} \ + -t ghcr.io/kayac/gunfish:${GIT_VER} \ --push \ . diff --git a/README.md b/README.md index edfbf53..c6f2bbc 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ Here is an example configuration: ```toml [provider] -port = 8203 +port = 8003 worker_num = 8 queue_size = 2000 max_request_size = 1000 diff --git a/docker/Dockerfile b/docker/Dockerfile index 8e5a33e..774b6e0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,16 +1,10 @@ -FROM alpine:3.9 +FROM alpine:3.18 LABEL maintainer "FUJIWARA Shunichiro " -ARG version - -RUN apk --no-cache add unzip curl && \ - mkdir -p /etc/gunfish /opt/gunfish && \ - curl -sL https://github.com/kayac/Gunfish/releases/download/${version}/gunfish-${version}-linux-amd64.zip > /tmp/gunfish-${version}-linux-amd64.zip && \ - cd /tmp && \ - unzip gunfish-${version}-linux-amd64.zip && \ - install gunfish-${version}-linux-amd64 /usr/bin/gunfish && \ - rm -f /tmp/gunfish* - +ARG VERSION +ARG TARGETARCH +ADD dist/Gunfish_linux_${TARGETARCH}/gunfish /usr/local/bin/gunifish +EXPOSE 8003 WORKDIR /opt/gunfish -ENTRYPOINT ["/usr/bin/gunfish"] +ENTRYPOINT ["/usr/local/bin/gunfish"]