dockerize image
This commit is contained in:
parent
d7b8e82b5c
commit
092ee0218f
|
@ -0,0 +1,17 @@
|
||||||
|
FROM golang:1.14
|
||||||
|
|
||||||
|
ADD . /tmp/code
|
||||||
|
|
||||||
|
RUN cd /tmp/code && make
|
||||||
|
|
||||||
|
FROM ubuntu:eoan
|
||||||
|
|
||||||
|
COPY --from=0 /tmp/code/redis-sentinel-proxy /usr/local/bin/redis-sentinel-proxy
|
||||||
|
|
||||||
|
ADD start /start
|
||||||
|
|
||||||
|
RUN chmod +x /start
|
||||||
|
|
||||||
|
USER nobody
|
||||||
|
|
||||||
|
ENTRYPOINT ["/start"]
|
|
@ -0,0 +1,17 @@
|
||||||
|
TAGNAME := dockermirror:5000/dpedu/redisproxy
|
||||||
|
LOCALNAME := redisproxy
|
||||||
|
|
||||||
|
.DEFAULT_GOAL: redis-sentinel-proxy
|
||||||
|
|
||||||
|
redis-sentinel-proxy:
|
||||||
|
go build -o $@
|
||||||
|
|
||||||
|
image:
|
||||||
|
rm -f redis-sentinel-proxy
|
||||||
|
docker build -t $(LOCALNAME) .
|
||||||
|
|
||||||
|
tag: image
|
||||||
|
docker tag $(LOCALNAME) $(TAGNAME)
|
||||||
|
|
||||||
|
push: tag
|
||||||
|
docker push $(TAGNAME)
|
Loading…
Reference in New Issue