Browse Source

Package into docker because of cgo .....

develop
Mingcai SHEN 2 years ago
parent
commit
d2336ca776
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      Dockerfile

+ 12
- 0
Dockerfile View File

@ -0,0 +1,12 @@
FROM golang:bullseye AS builder
RUN apt update && apt install -y build-essential libavcodec-dev libavutil-dev libswscale-dev
RUN mkdir /tmp/srd && go env -w GOPROXY="https://goproxy.io,direct"
ADD ./ /tmp/srd/
RUN cd /tmp/srd && make all
FROM debian:bullseye
MAINTAINER "Mingcai SHEN <archsh@gmail.com>"
RUN apt update && apt install -y libavcodec58 libavutil56 libswscale5
COPY --from=builder /tmp/srd/sport_rec_demo /usr/local/bin
EXPOSE 3000
CMD ["/usr/local/bin/sport_rec_demo", "serve", "-L", ":3000"]

Loading…
Cancel
Save