Skip to content

Commit

Permalink
lol
Browse files Browse the repository at this point in the history
  • Loading branch information
monoxane committed Apr 12, 2023
1 parent d90ed60 commit b728267
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM golang:latest AS api

ENV GO111MODULE=on \
CGO_ENABLED=1

WORKDIR /build

COPY go.mod .
COPY go.sum .
RUN go mod download

COPY . .

RUN go build -trimpath -o vxconnect .

WORKDIR /dist
RUN cp /build/vxconnect ./vxconnect

RUN ldd vxconnect | tr -s '[:blank:]' '\n' | grep '^/' | \
xargs -I % sh -c 'mkdir -p $(dirname ./%); cp % ./%;'
RUN mkdir -p lib64 && cp /lib64/ld-linux-x86-64.so.2 lib64/

FROM node:latest as react
RUN apt-get update && apt-get install -y glib2.0-dev libvips-dev
WORKDIR /build
COPY ./ui .
RUN yarn
RUN yarn run build

FROM alpine:latest
COPY --chown=0:0 --from=api /dist /
COPY --chown=0:0 --from=react /build/dist /dist
USER 0

ENTRYPOINT ["/vxconnect"]
EXPOSE 8080

0 comments on commit b728267

Please sign in to comment.