Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ACIDES
Hepto
k3s
Commits
597860d6
Commit
597860d6
authored
Oct 20, 2020
by
kaiyou
Committed by
kaiyou
Dec 31, 2020
Browse files
Add a specific Dockerfile for simple k3s
parent
2ea6b163
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
0 → 100644
View file @
597860d6
FROM
golang:1.15.2-alpine3.12
# Prepare the build environment
RUN
apk
-U
--no-cache
add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers zlib-dev
tar
zip squashfs-tools npm coreutils
\
python2 openssl-dev libffi-dev libseccomp libseccomp-dev make libuv-static sqlite-dev sqlite-static libselinux libselinux-dev zlib-dev zlib-static
RUN
mkdir
-p
/go/src/golang.org/x
\
&&
cd
/go/src/golang.org/x
&&
git clone https://github.com/golang/tools
&&
cd
tools
\
&&
git checkout
-b
current aa82965741a9fecd12b026fbb3d3c6ed3231b8f8
\
&&
go
install
golang.org/x/tools/cmd/goimports
\
&&
rm
-rf
/go/src /go/pkg
# Actually build k3s
ENV
GO111MODULE off
ENV
STATIC_BUILD true
COPY
. /go/src/github.com/rancher/k3s
WORKDIR
/go/src/github.com/rancher/k3s
RUN
mkdir
-p
etc build/static build/data
RUN
scripts/validate
RUN
scripts/build
RUN
scripts/package-cli
# Prepare the result image
FROM
alpine:latest
RUN
apk
-U
--no-cache
add libseccomp iptables ip6tables socat ethtool pigz coreutils findutils bash
COPY
--from=0 /go/src/github.com/rancher/k3s/dist/artifacts/k3s /go/src/github.com/racher/k3s/package/entrypoint.sh /usr/local/bin/
ENTRYPOINT
["/usr/local/bin/entrypoint.sh"]
package/entrypoint.sh
0 → 100755
View file @
597860d6
#!/bin/sh
mount
--make-shared
/
exec
/usr/local/bin/k3s
"
$@
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment