Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
inkluster-dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f8561211
authored
2025-01-23 16:11:48 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add docker and docker-buildx.
1 parent
158657b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
Dockerfile
wrapper.sh
Dockerfile
View file @
f856121
ARG DOCKER_VERSION=26.1.3
FROM
docker:${DOCKER_VERSION} AS docker-remote
FROM
scratch AS docker-buildx-remote
ARG DOCKER_BUILDX_VERSION=0.20.1
ADD
https://github.com/docker/buildx/releases/download/v0.20.1/buildx-v0.20.1.linux-amd64 /srv/docker-buildx
FROM
scratch AS helm-remote
ARG HELM_VERSION=3.16.4
ADD
https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz /srv/helm-linux-amd64.tar.gz
...
...
@@ -65,6 +72,8 @@ RUN true && set -x && \
true
FROM
host-base-tools AS host-build-tools
COPY --from=docker-remote /usr/local/bin/docker /usr/local/bin/docker
COPY --from=docker-buildx-remote /srv/docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx
COPY --from=helm-remote /srv/helm-linux-amd64.tar.gz /srv/helm-linux-amd64.tar.gz
COPY --from=helm-diff-remote /srv/helm-diff-linux-amd64.tgz /srv/helm-diff-linux-amd64.tgz
COPY --from=helm-git-remote /srv/helm-git.tar.gz /srv/helm-git.tar.gz
...
...
@@ -77,6 +86,7 @@ COPY --from=kustomize-remote /srv/kustomize_linux_amd64.tar.gz /srv/kustomize_li
COPY --from=skopeo-compiled /usr/local/bin/skopeo /usr/local/bin/skopeo
RUN
true
&&
set
-x
&&
\
chmod +x /usr/libexec/docker/cli-plugins/docker-buildx
&&
\
chown tool:tool /srv/
*
&&
\
chmod +x /usr/local/bin/kubectl
&&
\
cd
/tmp
&&
\
...
...
@@ -96,6 +106,7 @@ RUN true && set -x && \
tar -zxvf /srv/kustomize_linux_amd64.tar.gz
&&
\
mv kustomize /usr/local/bin/kustomize
&&
\
cd
..
&&
rm -rf install
&&
\
docker completion bash > /etc/bash_completion.d/docker
&&
\
helm completion bash > /etc/bash_completion.d/helm
&&
\
istioctl completion bash > /etc/bash_completion.d/istioctl
&&
\
kubectl completion bash > /etc/bash_completion.d/kubectl
&&
\
...
...
@@ -121,6 +132,7 @@ RUN true && set -x && \
FROM
host-base-tools AS final-output
COPY --from=host-build-tools /home/tool/ /home/tool/
COPY --from=host-build-tools /usr/libexec/docker/cli-plugins/ /usr/libexec/docker/cli-plugins/
COPY --from=host-build-tools /usr/local/bin/ /usr/local/bin/
COPY --from=host-build-tools /usr/local/sbin/ /usr/local/sbin/
COPY --from=host-build-tools /etc/bash_completion.d/ /etc/bash_completion.d/
...
...
wrapper.sh
View file @
f856121
...
...
@@ -39,6 +39,7 @@ declare -a docker_args=(--rm -i)
docker_args+
=(
-v /:/srv/host-root
)
docker_args+
=(
-w /srv/host-root/
$PWD
)
[[
-S /var/run/docker.sock
]]
&&
docker_args+
=(
-v /var/run/docker.sock:/var/run/docker.sock
)
[[
$SSH_AUTH_SOCK
]]
&&
docker_args+
=(
-e
"SSH_AUTH_SOCK=/srv/host-root/
$SSH_AUTH_SOCK
"
)
network
=
if
[[
$KUBECONFIG
]]
;
then
...
...
Please
register
or
sign in
to post a comment