mirror of
https://github.com/Snawoot/opera-proxy.git
synced 2025-09-01 18:20:23 +00:00
add docker manifest
This commit is contained in:
parent
eb97beadca
commit
e62f2e2ed7
3 changed files with 22 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
bin/
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM golang AS build
|
||||
|
||||
ARG GIT_DESC=undefined
|
||||
|
||||
WORKDIR /go/src/github.com/Snawoot/opera-proxy
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC"
|
||||
ADD https://curl.haxx.se/ca/cacert.pem /certs.crt
|
||||
RUN chmod 0644 /certs.crt
|
||||
|
||||
FROM scratch AS arrange
|
||||
COPY --from=build /go/src/github.com/Snawoot/opera-proxy/opera-proxy /
|
||||
COPY --from=build /certs.crt /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
FROM scratch
|
||||
COPY --from=arrange / /
|
||||
USER 9999:9999
|
||||
EXPOSE 8080/tcp
|
||||
ENTRYPOINT ["/opera-proxy", "-bind-address", "0.0.0.0:18080"]
|
2
hooks/build
Normal file
2
hooks/build
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker build --build-arg GIT_DESC="$(git describe)" -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" .
|
Loading…
Add table
Reference in a new issue