Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
#52 Build edgex-ui-go docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqiao Zhang <[email protected]>
  • Loading branch information
Huaqiao Zhang committed Aug 17, 2018
1 parent e260f0a commit e15ad7c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ Effect picture after refactoring frontend ui (to be done):
<img src ="assets/images/gentelella-overview.jpeg" />
</p>

## Running in docker

```
docker pull badboyqiao/edgex-ui-go:0.1
docker run -it -d -p 4000:4000 --name edgex-ui-go badboyqiao/edgex-ui-go:0.1
```

## Install and Deploy

To fetch the code and compile the web-based UI:
Expand Down
24 changes: 24 additions & 0 deletions docker-file/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.9-alpine AS builder
MAINTAINER huaqiao zhang <[email protected]>

RUN cp /etc/apk/repositories /etc/apk/repositories.bak
RUN echo "https://mirrors.ustc.edu.cn/alpine/v3.6/main" > /etc/apk/repositories
RUN echo "https://mirrors.ustc.edu.cn/alpine/v3.6/community" >> /etc/apk/repositories
RUN cat /etc/apk/repositories

RUN apk update && apk add git
RUN apk update && apk add make

COPY github.com /go/src/github.com/
WORKDIR /go/src/github.com/edgexfoundry-holding/edgex-ui-go/cmd/edgex-ui-go/
RUN GOOS=linux go build

FROM alpine:3.6

EXPOSE 4000

COPY --from=builder /go/src/github.com/edgexfoundry-holding/edgex-ui-go/ /go/src/github.com/edgexfoundry-holding/edgex-ui-go/

WORKDIR /go/src/github.com/edgexfoundry-holding/edgex-ui-go/cmd/edgex-ui-go

ENTRYPOINT ["./edgex-ui-go"]

0 comments on commit e15ad7c

Please sign in to comment.