-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.arm
More file actions
33 lines (30 loc) · 940 Bytes
/
Dockerfile.arm
File metadata and controls
33 lines (30 loc) · 940 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
# Build backend
FROM armhf/golang:1.8 as backend
RUN go get -v github.com/gorilla/mux && \
go get -v github.com/gorilla/websocket && \
go get -v github.com/kpango/glg && \
go get -v github.com/mkideal/cli && \
go get -v github.com/satori/go.uuid && \
go get -v gopkg.in/mgo.v2 && \
go get -v github.com/kapitanov/go-teamcity
RUN mkdir -p /go/src/github.com/itglobal/dashboard
WORKDIR /go/src/github.com/itglobal/dashboard
COPY . .
RUN go get -v
RUN go build -v -x
# Build frontend
FROM hypriot/rpi-node:8.1 as frontend
RUN mkdir -p /app
WORKDIR /app
COPY /ui /app
# RUN yarn install
# RUN yarn run build:prod
# Application container
FROM armv7/armhf-ubuntu:xenial
RUN apt-get update && apt-get install -y ca-certificates
RUN mkdir -p /app
WORKDIR /app
COPY --from=backend /go/src/github.com/itglobal/dashboard/dashboard /app
COPY --from=frontend /app/dist /app/www
RUN chmod +x /app/dashboard
CMD "/app/dashboard"