Skip to content

Commit 5b3244e

Browse files
security patches, Dockerfile:
change the node base image change the way jq and yq are installed clean yarn cache remove yarn from the prod image
1 parent b1407ad commit 5b3244e

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Dockerfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
FROM golang:alpine as go
22

3-
RUN apk add --update ca-certificates git
3+
RUN apk --update add ca-certificates git
4+
45
RUN go get github.com/github/hub
56

6-
FROM node:10.15.3-alpine
7+
FROM codefresh/node:10.15.3-alpine3.11
8+
9+
RUN apk --update add --no-cache ca-certificates git curl bash yarn
710

8-
RUN apk add --update ca-certificates git curl jq py-pip bash && pip install yq
911
COPY --from=go /go/bin/hub /usr/local/bin/hub
12+
13+
ARG JQ_VERSION=1.6
14+
ARG YQ_VERSION=2.4.1
15+
16+
RUN wget -O /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \
17+
wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \
18+
chmod +x /usr/local/bin/*
19+
1020
WORKDIR /cf-cli
1121

1222
COPY package.json /cf-cli
1323
COPY check-version.js /cf-cli
1424

15-
RUN yarn --prod install
25+
RUN yarn install --prod --frozen-lockfile && \
26+
yarn cache clean
1627

1728
COPY . /cf-cli
1829

1930
RUN yarn generate-completion
31+
RUN apk del yarn
2032

2133
RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh
2234

0 commit comments

Comments
 (0)