Skip to content

Commit

Permalink
update dokcerfile to fetch the correct binaries for the arch and upda…
Browse files Browse the repository at this point in the history
…te base image

Signed-off-by: Carlos Panato <[email protected]>
  • Loading branch information
cpanato committed Jan 7, 2022
1 parent 416fe0f commit 1e9ea74
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.14
FROM alpine:3.15

RUN apk --no-cache add \
bash \
Expand All @@ -21,21 +21,28 @@ ARG yamale_version=4.0.0
LABEL yamale_version=$yamale_version
RUN pip install "yamale==$yamale_version"

ARG TARGETPLATFORM
# Install kubectl
ARG kubectl_version=v1.21.5
ARG kubectl_version=v1.22.5
LABEL kubectl_version=$kubectl_version
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$kubectl_version/bin/linux/amd64/kubectl" && \
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$kubectl_version/bin/$TARGETPLATFORM/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/

# Install Helm
ARG helm_version=v3.7.2
LABEL helm_version=$helm_version
RUN curl -LO "https://get.helm.sh/helm-$helm_version-linux-amd64.tar.gz" && \
mkdir -p "/usr/local/helm-$helm_version" && \
tar -xzf "helm-$helm_version-linux-amd64.tar.gz" -C "/usr/local/helm-$helm_version" && \
ln -s "/usr/local/helm-$helm_version/linux-amd64/helm" /usr/local/bin/helm && \
rm -f "helm-$helm_version-linux-amd64.tar.gz"
RUN targetArch=$(echo $TARGETPLATFORM | cut -f2 -d '/') \
&& if [ ${targetArch} = "amd64" ]; then \
HELM_ARCH="linux-amd64"; \
elif [ ${targetArch} = "arm64" ]; then \
HELM_ARCH="linux-arm64"; \
fi \
&& curl -LO "https://get.helm.sh/helm-$helm_version-$HELM_ARCH.tar.gz" \
&& mkdir -p "/usr/local/helm-$helm_version" \
&& tar -xzf "helm-$helm_version-$HELM_ARCH.tar.gz" -C "/usr/local/helm-$helm_version" \
&& ln -s "/usr/local/helm-$helm_version/$HELM_ARCH/helm" /usr/local/bin/helm \
&& rm -f "helm-$helm_version-$HELM_ARCH.tar.gz"

COPY ./etc/chart_schema.yaml /etc/ct/chart_schema.yaml
COPY ./etc/lintconf.yaml /etc/ct/lintconf.yaml
Expand Down
1 change: 1 addition & 0 deletions pkg/chart/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build integration
// +build integration

package chart
Expand Down

0 comments on commit 1e9ea74

Please sign in to comment.