Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Jan 5, 2022
1 parent e23a667 commit c4febd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.10 as builder
FROM golang:1.17 as builder
ARG VERSION
WORKDIR /go/src/github.com/xwjdsh/manssh
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "-X main.version=${VERSION}" -o manssh ./cmd/manssh
RUN go build -a -installsuffix cgo -ldflags "-X main.version=${VERSION}" ./cmd/manssh

FROM alpine:latest
FROM alpine:3.15
LABEL maintainer="iwendellsun@gmail.com"
WORKDIR /
COPY --from=builder /go/src/github.com/xwjdsh/manssh/manssh .
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
build:
go build ./cmd/manssh

build-docker:
docker-build:
docker build --build-arg VERSION=`git describe --tags` -t wendellsun/manssh .

docker-push:
docker push wendellsun/manssh

0 comments on commit c4febd3

Please sign in to comment.