Skip to content
Snippets Groups Projects
Select Git revision
  • bb26e7269c5ac8bfd430d4a27e83d31fc0ecc58d
  • master default protected
2 results

Dockerfile

Blame
  • Janne Koschinski's avatar
    9391c747
    History
    Dockerfile 598 B
    FROM golang:alpine as builder
    RUN apk add --no-cache curl git gcc musl-dev
    RUN curl https://glide.sh/get | sh
    
    WORKDIR /go/src/app
    COPY glide.lock glide.yaml ./
    RUN glide install
    COPY . .
    RUN CGO_ENABLED=0 GOOS=linux go build -a app .
    
    FROM node:alpine as asset_builder
    WORKDIR /app
    COPY package* /app/
    RUN npm install
    COPY assets /app/assets
    RUN npm run build
    
    ENTRYPOINT ["/app"]
    FROM scratch
    COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
    COPY --from=builder /go/src/app/app /app
    COPY templates /templates
    COPY --from=asset_builder /app/assets /assets
    ENTRYPOINT ["/app"]