Skip to content

Commit 743be42

Browse files
Luciano ColosioLuciano Colosio
Luciano Colosio
authored and
Luciano Colosio
committed
Installing LTS nodejs 16.13.1
Alpine's outdated node package doesn't play well with package-lock V2 This pulls the current long term support binaries from a more recent alpine image rather than installing the registry's old one.
1 parent f58e687 commit 743be42

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
###################################
33
#Build stage
4+
FROM node:16.13.1-alpine AS node
45
FROM golang:1.17-alpine3.13 AS build-env
56

67
ARG GOPROXY
@@ -12,7 +13,13 @@ ENV TAGS "bindata timetzdata $TAGS"
1213
ARG CGO_EXTRA_CFLAGS
1314

1415
#Build deps
15-
RUN apk --no-cache add build-base git nodejs npm
16+
COPY --from=node /usr/lib /usr/lib
17+
COPY --from=node /usr/local/share /usr/local/share
18+
COPY --from=node /usr/local/lib /usr/local/lib
19+
COPY --from=node /usr/local/include /usr/local/include
20+
COPY --from=node /usr/local/bin /usr/local/bin
21+
22+
RUN apk --no-cache add build-base git npm
1623

1724
#Setup repo
1825
COPY . ${GOPATH}/src/code.gitea.io/gitea

0 commit comments

Comments
 (0)