Closed Bean900 closed 4 years ago
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
ENV USER
needs to be set
@AkihiroSuda where did you set ENV USER
? I tried it do in jenkins-slave docker but still get this error.
You have to write ENV USER jenkins
Or in the example Dockerfile i wrote ENV USER ${user}
@Bean900 thanks) Gess to this early))) Come to set my dockerfile for jenkins slave))
This jenkins slave works in OKD 3.11
# The MIT License
#
# Copyright (c) 2015-2017, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
ARG version=3.40-1-alpine
FROM jenkins/slave:$version
ARG version
MAINTAINER Oleg Nenashev <o.v.nenashev@gmail.com>
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version"
ENV user=jenkins
USER root
COPY jenkins-agent /usr/local/bin/jenkins-agent
RUN chmod +x /usr/local/bin/jenkins-agent &&\
ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave && \
apk add --no-cache gcc make && \
apk add img --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing && \
ln -s /usr/bin/img /usr/bin/docker
USER ${user}
ENTRYPOINT ["jenkins-slave"]
U need to write user in uppercase letters like "USER" ;)
U need to write user in uppercase letters like "USER" ;)
Strange...it works...
Hey :)
i want to use img to create dockerimages in jenkins slave that runs as dockerimage in a Kubernetes cluster. I am currently experiencing the following error when using the jenkins user:
nsenter: USER is unset: No error information
When I use the root user, I get this error as expected (is only for testing):
So my question is how to use the Jenkins user and get the same error as when I use the root user.
To test this case, I used the following Docker file: