Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DracoBlue committed Jan 26, 2020
0 parents commit 140e744
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpine:3.10.3
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN apk add --no-cache curl=7.66.0-r0
ARG KUBERNETES_VERSION=unknown
ENV KUBERNETES_VERSION $KUBERNETES_VERSION
RUN cd /usr/local/bin/ && wget https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["kubectl"]
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- kubectl "$@"
fi

exec "$@"
2 changes: 2 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
docker build --build-arg KUBERNETES_VERSION=$SOURCE_BRANCH -f $DOCKERFILE_PATH -t $IMAGE_NAME .

0 comments on commit 140e744

Please sign in to comment.