Skip to content

Commit

Permalink
upgrade dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdoxsey committed Aug 30, 2019
1 parent 4952b24 commit 96e0ba6
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 61 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dockerfile
.git/
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

36 changes: 21 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
FROM golang:1.9-alpine as builder
RUN apk --no-cache add musl-dev build-base
WORKDIR /go/src/app
COPY . .
RUN go build -o /bin/app .

FROM alpine:3.6
RUN apk --no-cache add ca-certificates
WORKDIR /root
COPY --from=0 /bin/app /root/app
COPY ./assets /root/assets
COPY ./tpl /root/tpl
CMD ["./app"]

EXPOSE 80
FROM golang:1.13-rc-alpine

RUN apk add --update \
build-base \
ca-certificates \
musl-dev \
git \
&& rm -rf /var/cache/apk/*

RUN echo "nobody:x:65534:65534:Nobody:/:" > /etc_passwd

ENV GO111MODULE=on

WORKDIR /go/src/github.com/badgerodon/www
COPY go.mod go.sum ./
RUN go mod download

COPY . ./
RUN go install -ldflags='-s -w' -tags netgo -installsuffix netgo -v ./...

CMD ["/go/bin/www"]
13 changes: 0 additions & 13 deletions build.dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions build.sh

This file was deleted.

2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ require (
github.com/badgerodon/statistics v0.0.0-20131221025257-85bdd4e56e4c
golang.org/x/net v0.0.0-20170922011244-0744d001aa84
)

go 1.13
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/badgerodon/lalg v0.0.0-20131221025232-d98d02968c5b h1:DebipT/HrvmO+hGE6LPnphZ28+fe5dkTjOgxND+wDmM=
github.com/badgerodon/lalg v0.0.0-20131221025232-d98d02968c5b/go.mod h1:KJE7fIWVRfU1GQxeBHFJlUtrXsxboK2KxbyzTEjLWbo=
github.com/badgerodon/quadprog v0.0.0-20170722135126-99da70fa15d4 h1:Kd8/F1rpafyZ9qn/yumntlq6ugWIpm3rzeeMKim61K0=
github.com/badgerodon/quadprog v0.0.0-20170722135126-99da70fa15d4/go.mod h1:A9oxBime5oC2WvJ9fzaVUby/g6x+2AZDm6WvLthVRbs=
github.com/badgerodon/rbsa v0.0.0-20131221025205-465af9ff0d02 h1:jJFizI4pzr4IquL3NwesVpwi4pnyYOD89bpT4KW5CJU=
github.com/badgerodon/rbsa v0.0.0-20131221025205-465af9ff0d02/go.mod h1:YiazWXavVMpYvf5xqbaBt4LWzLlvk9B4RzhUGpJYIS4=
github.com/badgerodon/statistics v0.0.0-20131221025257-85bdd4e56e4c h1:znvoHaKfVLHRBbwrHapJkz4lQiTvtLOgZWQ4M2QrPac=
github.com/badgerodon/statistics v0.0.0-20131221025257-85bdd4e56e4c/go.mod h1:FRDUQ/ZQXLi/44kAf31FKJpcJklfxzTjbfiji+qA/iY=
golang.org/x/net v0.0.0-20170922011244-0744d001aa84 h1:FFXeeSR9Hq1BBmpYJonYmvi9cTbUHJnNAASHkdlc0Zs=
golang.org/x/net v0.0.0-20170922011244-0744d001aa84/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

0 comments on commit 96e0ba6

Please sign in to comment.