The best alpine os with docker ever now

in takagotch •  5 years ago 

FROM alpine:3.7

WORKDIR / ENV GOPATH /go

RUN apk add --no-cache --virtual=build=deps go git gcc g++

COPY . /go/src/github.com/takagotch/todoapi
RUN go get github.com/go-sql-driver/mysql

RUN go get gopkg.in/gorp.v1

RUN cd /go/src/github.com/takagotch/todoapi && go build -o bin/todoapi cmd/main.go

RUN cd /go/src/github.com/takagotch/todoapi && cp bin/todoapi /usr/local/bin/

RUN apk del --no-cache build-deps

CMD ["todoapi"]

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!