-
Notifications
You must be signed in to change notification settings - Fork 12
Build a docker image with greenframe-cli #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
4afe784
f105e38
309d657
8849cae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # syntax=docker/dockerfile:1 | ||
| FROM node:16 as base | ||
|
|
||
| RUN apt update && apt install -y \ | ||
| apt-transport-https \ | ||
| bash \ | ||
| ca-certificates \ | ||
| curl \ | ||
| git \ | ||
| gnupg2 \ | ||
| lsb-release \ | ||
| python3 \ | ||
| software-properties-common | ||
|
|
||
| # Install docker | ||
| RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | ||
| RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" | ||
| RUN apt update && apt install -y \ | ||
| containerd.io \ | ||
| docker-ce \ | ||
| docker-ce-cli \ | ||
| docker-compose-plugin \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install kubectl cli | ||
| RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
| RUN chmod +x ./kubectl | ||
| RUN mv ./kubectl /usr/local/bin/kubectl | ||
|
|
||
| # Install greenframe cli | ||
| RUN cd /root \ | ||
| && curl https://assets.greenframe.io/install.sh | bash | ||
| ENV PATH $PATH:/root/.local/bin | ||
|
|
||
| RUN mkdir /app | ||
| RUN git config --global --add safe.directory /app | ||
| WORKDIR /app | ||
|
|
||
|
|
||
| ## Specific build with GCP tools | ||
| FROM base as gcp | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this part related to greenframe?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it would be great to offer all the necessary tools for the major cloud providers (GCP, AWS, Azure) and create a specific version of the greenframe-cli image. I added a new make command (which can be used in the GitHub workflow) to build these images: for the base image, and: for the specific cloud providers. One greenframe-cli version will have these docker version:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not something we want to maintain in this repository. I prefer that we provide a cloud-agnostic base image, and leave to the community the cloud-specific images. |
||
| RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz | ||
| RUN mkdir -p /usr/local/gcloud \ | ||
| && tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \ | ||
| && /usr/local/gcloud/google-cloud-sdk/install.sh | ||
| ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin | ||
| RUN gcloud components install gke-gcloud-auth-plugin | ||
Uh oh!
There was an error while loading. Please reload this page.