Skip to content

Instantly share code, notes, and snippets.

@bscott
Last active July 8, 2017 18:23
Show Gist options
  • Select an option

  • Save bscott/c3b84d95a9efba9ff5e43d847d41948b to your computer and use it in GitHub Desktop.

Select an option

Save bscott/c3b84d95a9efba9ff5e43d847d41948b to your computer and use it in GitHub Desktop.
Buffalo multistage
FROM gobuffalo/buffalo:development as builder
ENV BP=$GOPATH/src/github.com/gopherguides/web
RUN mkdir -p $BP
WORKDIR $BP
ADD package.json .
RUN npm install
ADD . .
RUN buffalo build --static -o /bin/app
FROM alpine
RUN apk add --no-cache bash
WORKDIR /bin/
COPY --from=builder /bin/app .
EXPOSE 3000
CMD /bin/app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment