Fix Dockerfile by ensuring npm install is run

This commit is contained in:
akp 2023-08-25 21:23:55 +01:00
parent 12ed3b5400
commit 9288268e63
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -12,9 +12,13 @@ RUN npm --version
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN bash -c "(cd web; npm run build)"
WORKDIR /build/web
RUN npm install
RUN npm run build
WORKDIR /build
RUN CGO_ENABLED=1 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags "-extldflags '-static'" -o main github.com/codemicro/railmiles/railmiles