-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add rootless * Revert "CR-16573 -- rootless (#789)" This reverts commit 059fc5b. * boost pipelines * fix bootsted pipelines * reorganize boosted pipelines * fix arm tagging
- Loading branch information
1 parent
059fc5b
commit 3c6636a
Showing
9 changed files
with
487 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# go hub binary | ||
FROM golang:alpine as go | ||
RUN apk --update add ca-certificates git | ||
RUN go install github.com/github/hub@latest | ||
|
||
# python yq binary | ||
FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 as yq | ||
ARG YQ_VERSION=2.10.0 | ||
ENV PATH="/pyinstaller:$PATH" | ||
RUN pip install yq==${YQ_VERSION} | ||
RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq) | ||
|
||
# Main | ||
FROM node:18.12.1-bullseye-slim | ||
|
||
RUN apt update | ||
RUN apt -y install ca-certificates git curl bash jq busybox && ln -s /bin/busybox /usr/bin/[[ | ||
|
||
COPY --from=go /go/bin/hub /usr/local/bin/hub | ||
COPY --from=yq /tmp/yq /usr/local/bin/yq | ||
|
||
WORKDIR /cf-cli | ||
|
||
COPY package.json /cf-cli | ||
COPY yarn.lock /cf-cli | ||
COPY check-version.js /cf-cli | ||
COPY run-check-version.js /cf-cli | ||
|
||
RUN yarn install --prod --frozen-lockfile && \ | ||
yarn cache clean | ||
|
||
COPY . /cf-cli | ||
|
||
RUN yarn generate-completion | ||
|
||
RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh | ||
|
||
RUN codefresh components update --location components | ||
|
||
# we keep /root as home directory because cli by default looks for $HOME/.cfconfig | ||
# and we do not want to break user automation if he used to bind his .cfconfig | ||
# to the /root/.cfconfig | ||
RUN useradd -m -d /root -s /bin/sh cfu \ | ||
&& chown -R $(id -g cfu) /root /cf-cli \ | ||
&& chgrp -R $(id -g cfu) /root /cf-cli \ | ||
&& chmod -R g+rwX /root | ||
|
||
USER cfu | ||
|
||
ENTRYPOINT ["codefresh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# go hub binary | ||
FROM golang:alpine as go | ||
RUN apk --update add ca-certificates git | ||
RUN go install github.com/github/hub@latest | ||
|
||
# python yq binary | ||
FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 as yq | ||
ARG YQ_VERSION=2.10.0 | ||
ENV PATH="/pyinstaller:$PATH" | ||
RUN pip install yq==${YQ_VERSION} | ||
RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq) | ||
|
||
# Main | ||
FROM node:18.12.1-alpine3.15 | ||
|
||
RUN apk --update add --no-cache ca-certificates git curl bash jq | ||
|
||
COPY --from=go /go/bin/hub /usr/local/bin/hub | ||
COPY --from=yq /tmp/yq /usr/local/bin/yq | ||
|
||
WORKDIR /cf-cli | ||
|
||
COPY package.json /cf-cli | ||
COPY yarn.lock /cf-cli | ||
COPY check-version.js /cf-cli | ||
COPY run-check-version.js /cf-cli | ||
|
||
RUN yarn install --prod --frozen-lockfile && \ | ||
yarn cache clean | ||
|
||
COPY . /cf-cli | ||
|
||
RUN yarn generate-completion | ||
|
||
RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh | ||
|
||
RUN codefresh components update --location components | ||
|
||
# we keep /root as home directory because cli by default looks for $HOME/.cfconfig | ||
# and we do not want to break user automation if he used to bind his .cfconfig | ||
# to the /root/.cfconfig | ||
RUN adduser -D -h /root -s /bin/sh cfu \ | ||
&& chown -R $(id -g cfu) /root /cf-cli \ | ||
&& chgrp -R $(id -g cfu) /root /cf-cli \ | ||
&& chmod -R g+rwX /root | ||
|
||
USER cfu | ||
|
||
ENTRYPOINT ["codefresh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.