Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Oct 17, 2023
1 parent 1495964 commit 55e3775
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 6 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
FROM alpine:3.9
FROM alpine:3.18
LABEL maintainer "FUJIWARA Shunichiro <[email protected]>"

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"]

0 comments on commit 55e3775

Please sign in to comment.