-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (31 loc) · 982 Bytes
/
Copy pathDockerfile
File metadata and controls
54 lines (31 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:latest as go
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /app/
WORKDIR $GOPATH/src/gitlab.com/kamackay/filer
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y git apt-utils golang-go
ADD ./go.mod ./
RUN go mod download && \
go mod verify
COPY ./ ./
RUN go build -tags=jsoniter -o application.file ./index.go && cp ./application.file /app/
FROM node:16-alpine as react
WORKDIR /app
COPY ./ui/package.json ./ui/yarn.lock ./
RUN yarn --frozen-lockfile
COPY ./ui/ ./
RUN yarn build
FROM ubuntu:latest as stage
ENV DEBIAN_FRONTEND noninteractive
# Install Video Conversion Libraries
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --reinstall ffmpeg apt-utils ca-certificates vim
# To create the temp folder inside of the image
WORKDIR /temp
WORKDIR /files
COPY --from=go /app/application.file /server
COPY --from=react /app/build /ui
COPY ./mime.types /etc
# FROM scratch
# COPY --from=stage / /
CMD /server