0.1.2-rc1
parent
e92b8310a1
commit
e47242cfb8
|
@ -12,8 +12,14 @@ RUN VERSION=$(git describe --tags) BUILD=$(git rev-parse --short HEAD) && \
|
||||||
-o /go/bin/myip main.go
|
-o /go/bin/myip main.go
|
||||||
|
|
||||||
FROM alpine:3.14
|
FROM alpine:3.14
|
||||||
|
|
||||||
EXPOSE 5080
|
EXPOSE 5080
|
||||||
|
ENV PATH="/go/bin:${PATH}"
|
||||||
|
|
||||||
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||||
COPY --from=builder /go/bin/myip /go/bin/myip
|
COPY --from=builder /go/bin/myip /go/bin/myip
|
||||||
ENTRYPOINT ["/go/bin/myip","serve"]
|
CMD ["/go/bin/myip","serve"]
|
||||||
|
|
||||||
|
# use cmd instead for flexibility
|
||||||
|
# ENTRYPOINT ["/go/bin/myip","serve"]
|
||||||
|
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -33,12 +33,15 @@ docker:
|
||||||
-t $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION) \
|
-t $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION) \
|
||||||
.
|
.
|
||||||
|
|
||||||
release: build-bins build-m1 docker
|
docker-push:
|
||||||
docker tag $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION) $(HUB)/$(HUB_PROJECT)/$(PROJ):latest
|
docker tag $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION) $(HUB)/$(HUB_PROJECT)/$(PROJ):latest
|
||||||
docker push $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION)
|
docker push $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION)
|
||||||
docker push $(HUB)/$(HUB_PROJECT)/$(PROJ):latest
|
docker push $(HUB)/$(HUB_PROJECT)/$(PROJ):latest
|
||||||
|
|
||||||
save:
|
docker-save:
|
||||||
docker save -o dist/$(PROJ)-$(VERSION)-${BUILD}.tar $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION)
|
docker save -o dist/$(PROJ)-$(VERSION)-${BUILD}.tar $(HUB)/$(HUB_PROJECT)/$(PROJ):$(VERSION)
|
||||||
|
|
||||||
|
|
||||||
|
release: build-bins build-m1 docker docker-save docker-push
|
||||||
|
|
||||||
.PHONY: build docker release clean all
|
.PHONY: build docker release clean all
|
|
@ -30,3 +30,12 @@ Flags:
|
||||||
|
|
||||||
Use "myip [command] --help" for more information about a command.
|
Use "myip [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
Server:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull hub.kumoly.io/tools/myip:latest
|
||||||
|
docker run --name myip-server -d -p 5080:5080 --restart=always hub.kumoly.io/tools/myip
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue