mirror of https://github.com/k3s-io/k3s.git
Set osImage for docker image
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
156bae2940
commit
58315fe135
|
@ -9,10 +9,12 @@ RUN cd image/bin && \
|
|||
ln -s k3s-server k3s
|
||||
|
||||
FROM scratch
|
||||
ARG VERSION="dev"
|
||||
COPY --from=base /image /
|
||||
RUN mkdir -p /etc && \
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
RUN chmod 1777 /tmp
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf && \
|
||||
echo "PRETTY_NAME=\"K3s ${VERSION}\"" > /etc/os-release && \
|
||||
chmod 1777 /tmp
|
||||
VOLUME /var/lib/kubelet
|
||||
VOLUME /var/lib/rancher/k3s
|
||||
VOLUME /var/lib/cni
|
||||
|
|
|
@ -14,6 +14,6 @@ PROXY_OPTS=
|
|||
[ -z "$http_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg http_proxy=$http_proxy"
|
||||
[ -z "$https_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg https_proxy=$https_proxy"
|
||||
[ -z "$no_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg no_proxy=$no_proxy"
|
||||
docker build ${PROXY_OPTS} -t ${IMAGE} -f package/Dockerfile .
|
||||
docker build ${PROXY_OPTS} --build-arg VERSION=${VERSION} -t ${IMAGE} -f package/Dockerfile .
|
||||
./scripts/image_scan.sh ${IMAGE}
|
||||
echo Built ${IMAGE}
|
||||
|
|
Loading…
Reference in New Issue