Skip to content

Commit 214677f

Browse files
committed
docker file
1 parent b5982a2 commit 214677f

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:buster-slim
2+
WORKDIR /app
3+
RUN apt update
4+
RUN apt install -y ca-certificates
5+
RUN apt install openssl
6+
RUN update-ca-certificates --fresh
7+
ARG listen=0.0.0.0
8+
ARG port=8088
9+
ENV listen=$listen
10+
ENV port=$port
11+
COPY builds/linux/amd64/getsum ./
12+
CMD /app/getsum -s -l $listen -p $port -dir /tmp
13+
EXPOSE $port

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v2.0

docker-build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
VERSION=$(cat VERSION)
3+
docker build -t getsum:$VERSION .

generateReleases.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
VERSION=$(cat VERSION)
23
for GOOS in darwin linux windows openbsd freebsd ; do
34
for GOARCH in 386 amd64; do
45
GO_BIN_PATH="builds/$GOOS/$GOARCH"
@@ -8,7 +9,7 @@ for GOOS in darwin linux windows openbsd freebsd ; do
89
EXTENSION=".exe"
910
fi
1011
time GOOS=$GOOS GOARCH=$GOARCH go build -a -v -o ./$GO_BIN_PATH/getsum$EXTENSION ./cmd/getsum/main.go
11-
TAR_FILE=$(pwd)/$GO_BIN_PATH/getsum-$GOOS-$GOARCH.tar.gz
12+
TAR_FILE=$(pwd)/$GO_BIN_PATH/getsum-$GOOS-$GOARCH-$VERSION.tar.gz
1213
tar -czvf $TAR_FILE $GO_BIN_PATH
1314
done
1415
done

0 commit comments

Comments
 (0)