github.com/wawandco/ox@v0.13.6-0.20230809142027-913b3d837f2a/plugins/tools/docker/templates/Dockerfile.tmpl (about) 1 FROM golang:1.16 as builder 2 3 # Installing nodejs 4 RUN apk add --update nodejs-current curl bash build-base 5 6 # Installing Yarn 7 RUN curl -o- -L https://yarnpkg.com/install.sh | bash 8 ENV PATH="$PATH:/root/.yarn/bin:/root/.config/yarn/global/node_modules" 9 10 # Installing Ox 11 RUN go install github.com/wawandco/ox/cmd/ox@latest 12 WORKDIR /app 13 ADD . . 14 15 # Building the application binary in bin/app 16 RUN ox build --static -o bin/app 17 18 FROM alpine 19 # Binaries 20 COPY --from=builder /app/bin/* /bin/ 21 22 # For migrations use 23 # CMD ox db migrate; app 24 CMD app