FROM node:onbuild EXPOSE 8080
FROM node:alpine WORKDIR /app COPY package.json /app/package.json RUN npm install --production COPY server.js /app/server.js EXPOSE 8080 CMD npm start
FROM golang:alpine WORKDIR /app ADD . /app RUN cd /app && go build -o goapp EXPOSE 8080 ENTRYPOINT ./goapp
FROM golang:alpine AS build-env WORKDIR /app ADD . /app RUN cd /app && go build -o goapp FROM alpine RUN apk update && \ apk add ca-certificates && \ update-ca-certificates && \ rm -rf /var/cache/apk/* WORKDIR /app COPY --from=build-env /app/goapp /app EXPOSE 8080 ENTRYPOINT ./goapp
Go Onbuild: 35 secondi Go Multistage: 23 secondi
Go Onbuild: 15 secondi Go Multistage: 14 secondi
Go Onbuild: 26 secondi Go Multistage: 6 secondi
Go Onbuild: 25 secondi Go Multistage: 20 secondi
Go Onbuild: 52 secondi Go Multistage: 6 secondi
Go Onbuild: 54 secondi Go Multistage: 28 secondi
Go Onbuild: 48 secondi Go Multistage: 16 secondi