Skip to content

Commit ede39c5

Browse files
Better way of compiling yq
* Updated yq binary building * Update package version Co-authored-by: alex-codefresh <33512662+alex-codefresh@users.noreply.github.com>
1 parent 29da33b commit ede39c5

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

Dockerfile

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1+
# go hub binary
12
FROM golang:alpine as go
2-
33
RUN apk --update add ca-certificates git
4-
54
RUN go get github.com/github/hub
65

7-
FROM python:3.7 as yq
8-
6+
# python yq binary
7+
FROM six8/pyinstaller-alpine as yq
98
ARG YQ_VERSION=2.10.0
9+
ENV PATH="/pyinstaller:$PATH"
10+
RUN pip install yq==${YQ_VERSION}
11+
RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq)
1012

11-
RUN pip install yq==${YQ_VERSION} && \
12-
pip install pyinstaller==3.6 && \
13-
pyinstaller --onefile /usr/local/bin/yq --dist /tmp/
14-
13+
# Main
1514
FROM codefresh/node:10.15.3-alpine3.11
1615

1716
RUN apk --update add --no-cache ca-certificates git curl bash yarn
1817

1918
COPY --from=go /go/bin/hub /usr/local/bin/hub
2019
COPY --from=yq /tmp/yq /usr/local/bin/yq
2120

22-
# add glibc compatibility layer for the compiled yq
23-
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
24-
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk && \
25-
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-bin-2.30-r0.apk && \
26-
apk add glibc-2.30-r0.apk glibc-bin-2.30-r0.apk && \
27-
rm /etc/apk/keys/sgerrand.rsa.pub
28-
2921
ARG JQ_VERSION=1.6
3022

3123
RUN wget -O /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.41.11",
3+
"version": "0.41.12",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)