mirror of
https://github.com/Luzifer/ws-relay.git
synced 2024-11-08 14:20:01 +00:00
33 lines
626 B
Text
33 lines
626 B
Text
|
FROM golang:alpine as builder
|
||
|
|
||
|
COPY . /go/src/github.com/Luzifer/ws-relay
|
||
|
WORKDIR /go/src/github.com/Luzifer/ws-relay
|
||
|
|
||
|
RUN set -ex \
|
||
|
&& apk add --update \
|
||
|
build-base \
|
||
|
git \
|
||
|
&& go install \
|
||
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
||
|
-mod=readonly \
|
||
|
-modcacherw \
|
||
|
-trimpath
|
||
|
|
||
|
|
||
|
FROM alpine:latest
|
||
|
|
||
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||
|
|
||
|
RUN set -ex \
|
||
|
&& apk --no-cache add \
|
||
|
ca-certificates
|
||
|
|
||
|
COPY --from=builder /go/bin/ws-relay /usr/local/bin/ws-relay
|
||
|
|
||
|
EXPOSE 3000
|
||
|
|
||
|
ENTRYPOINT ["/usr/local/bin/ws-relay"]
|
||
|
CMD ["--"]
|
||
|
|
||
|
# vim: set ft=Dockerfile:
|