ws-relay/Dockerfile
2022-05-21 15:21:51 +02:00

32 lines
626 B
Docker

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: