Skip to content

Commit

Permalink
Update Dockerfile and add build-docker.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Apr 20, 2018
1 parent bf776e4 commit 97e114d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ COPY . .
RUN yarn install && webpack

FROM golang:1.9 as builder-backend
ARG VERSION
WORKDIR /go/src/github.com/go-ignite/ignite-admin
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o ignite-admin .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${VERSION}" -o ignite-admin

FROM alpine
LABEL maintainer="go-ignite"
Expand All @@ -25,4 +26,4 @@ COPY --from=builder-frontend /ignite-admin/static ./static
RUN mv ./conf/config-temp.toml ./conf/config.toml

EXPOSE 8000
CMD ["/bin/sh", "-c", "./ignite-admin"]
ENTRYPOINT ["./ignite-admin"]
2 changes: 2 additions & 0 deletions build-dokcer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/bash
docker build --build-arg VERSION=`git describe` -t goignite/ignite-admin .

0 comments on commit 97e114d

Please sign in to comment.