mirror of https://github.com/mpolden/echoip
Changes to for deployment
This commit is contained in:
parent
6e7a3278ac
commit
15d27d6aca
|
@ -0,0 +1,2 @@
|
|||
Dockerfile
|
||||
Dockerfile.geoip
|
|
@ -9,9 +9,9 @@ RUN make
|
|||
# Run
|
||||
FROM scratch
|
||||
EXPOSE 8080
|
||||
COPY --from=build \
|
||||
/go/bin/echoip \
|
||||
/go/src/github.com/mpolden/echoip/index.html \
|
||||
/opt/echoip/
|
||||
|
||||
COPY --from=build /go/bin/echoip /opt/echoip/
|
||||
COPY html /opt/echoip/html
|
||||
|
||||
WORKDIR /opt/echoip
|
||||
ENTRYPOINT ["/opt/echoip/echoip"]
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Build
|
||||
FROM golang:1.13-buster AS build
|
||||
WORKDIR /go/src/github.com/mpolden/echoip
|
||||
COPY . .
|
||||
# Must build without cgo because libc is unavailable in runtime image
|
||||
ENV GO111MODULE=on CGO_ENABLED=0
|
||||
RUN make
|
||||
|
||||
# Run
|
||||
FROM scratch
|
||||
EXPOSE 8080
|
||||
|
||||
COPY --from=build /go/bin/echoip /opt/echoip/
|
||||
COPY html /opt/echoip/html
|
||||
COPY data /opt/echoip/data
|
||||
|
||||
WORKDIR /opt/echoip
|
||||
ENTRYPOINT ["/opt/echoip/echoip"]
|
|
@ -32,7 +32,7 @@
|
|||
<div class="content">
|
||||
<div class="pure-g gutters center">
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<h1>{{ .Hostname }} — What is my IP address?</h1>
|
||||
<h1>{{ .Host }} — What is my IP address?</h1>
|
||||
<p><code class="ip">{{ .IP }}</code></p>
|
||||
<p>
|
||||
The best tool to find your own IP address, and information about it.
|
||||
|
|
Loading…
Reference in New Issue