Skip to content

Commit 51e73f5

Browse files
committed
use go mod; update README.md
1 parent 6049a4b commit 51e73f5

File tree

7 files changed

+39
-86
lines changed

7 files changed

+39
-86
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
FROM golang:1.11.0-alpine AS builder
1+
FROM golang:1.11.2-alpine AS builder
22

3-
RUN wget https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -q -O $GOPATH/bin/dep && chmod +x $GOPATH/bin/dep
4-
RUN apk update && apk add --no-cache git && rm -rf /var/cache/apk/*
3+
RUN apk update && apk add git
54

65
ARG APP_PKG
76
WORKDIR /go/src/${APP_PKG}
87

9-
COPY Gopkg.* ./
10-
RUN dep ensure -vendor-only
8+
ENV GO111MODULE=on
9+
10+
COPY go.* ./
11+
RUN go mod download
1112

1213
COPY . .
1314

Gopkg.lock

Lines changed: 0 additions & 43 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 38 deletions
This file was deleted.

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ image:
88
--build-arg APP_PKG=${APP_PKG} \
99
--build-arg APP_VERSION=${APP_VERSION} \
1010
-t ${APP_NAME}:${APP_VERSION} .
11+
12+
.PHONY: publish
13+
publish: image
14+
docker tag ${APP_NAME}:${APP_VERSION} isayme/${APP_NAME}:${APP_VERSION}
15+
docker push isayme/${APP_NAME}:${APP_VERSION}
16+
docker tag ${APP_NAME}:${APP_VERSION} isayme/${APP_NAME}:latest
17+
docker push isayme/${APP_NAME}:latest

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
## Shadowsocks
2+
A fast and memory efficient shadowsocks server in Go.
3+
4+
## Dev
5+
> go run cmd/ssserver/main.go -c /path/to/config.json
6+
7+
## Docker
8+
> docker pull isayme/shadowsocks:latest
9+
10+
### Image
11+
> make image
12+
13+
### Pubulish Tag
14+
> make publish

go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/isayme/go-shadowsocks
2+
3+
require (
4+
github.com/panjf2000/ants v0.0.0-20181002135227-29730bb70343
5+
github.com/pkg/errors v0.8.0
6+
github.com/rs/zerolog v1.9.1
7+
)

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/panjf2000/ants v0.0.0-20181002135227-29730bb70343 h1:BPGbBqy+30igjFglTFXJhzdeQ+eP3RlxiIyC7pOkjUk=
2+
github.com/panjf2000/ants v0.0.0-20181002135227-29730bb70343/go.mod h1:AaACblRPzq35m1g3enqYcxspbbiOJJYaxU2wMpm1cXY=
3+
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
4+
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
5+
github.com/rs/zerolog v1.9.1 h1:AjV/SFRF0+gEa6rSjkh0Eji/DnkrJKVpPho6SW5g4mU=
6+
github.com/rs/zerolog v1.9.1/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=

0 commit comments

Comments
 (0)