diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..94c3d6b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +.github + diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 6c5db93..f18861c 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -10,5 +10,11 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag k3.5s:$(date +%s) + - name: Build k3s + run: | + docker build . --file Dockerfile --tag k3.5s:${GITHUB_SHA} && + id=$(docker create k3.5s:${GITHUB_SHA}) && docker cp ${id}:/usr/local/bin/k3s ${GITHUB_WORKSPACE}/k3s && docker rm -v ${id} && chmod a+x ${GITHUB_WORKSPACE}/k3s + - uses: actions/upload-artifact@v2 + with: + name: k3s + path: k3s diff --git a/Dockerfile b/Dockerfile index fd48a9d..2e28358 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN curl -sSL https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-amd6 | tar -v -C /usr/local -xz && \ mkdir -p /go/src /go/bin && chmod -R 777 /go -ARG K3S_GIT_BRANCH=release/v1.0 +ARG K3S_GIT_BRANCH=v1.17.4+k3s1 RUN cd /go && git clone https://github.com/rancher/k3s.git --branch ${K3S_GIT_BRANCH} --single-branch k3s WORKDIR /go/k3s diff --git a/README.md b/README.md index 0379d35..514be28 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Extending The `Dockerfile` contains many build options and by default most of them are very conservative. You're welcome to adjust them to fit your needs: - * K3S_GIT_BRANCH: This refers to a specific branch in the [k3s repo](https://github.com/rancher/k3s) to use. The default is `release/v1.0`. + * K3S_GIT_BRANCH: This refers to a specific branch in the [k3s repo](https://github.com/rancher/k3s) to use. The default is `v1.17.4+k3s1`. * APPLY_PATCHES_CSV: A comma separated list of patches which must exist in [patches folder](patches/). The default is `enable_zfs`. *NOTE*: Due to some limitations in k3s and/or k3.5s - it may _not_ be possible to apply certain combinations of patches.