diff --git a/core/src/epicli/Dockerfile b/core/src/epicli/Dockerfile index c0b8e3a364..7352b6350f 100644 --- a/core/src/epicli/Dockerfile +++ b/core/src/epicli/Dockerfile @@ -5,6 +5,7 @@ ARG EPICLI_VERSION ARG USERNAME=epiuser ARG USER_UID=1000 ARG USER_GID=$USER_UID +ARG SHARED_DIR=/shared ENV DOCKER_CLI Yes @@ -14,23 +15,24 @@ WORKDIR /epicli RUN apt-get update \ && apt-get -y install gcc make musl-dev libffi-dev tar unzip openssh-client vim \ && apt-get -y install ruby-full \ - && gem install serverspec rake rspec_junit_formatter + && gem install serverspec rake rspec_junit_formatter RUN pip install epicli-${EPICLI_VERSION}-py3-none-any.whl RUN groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && apt-get install -y sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME \ - + && chmod 0440 /etc/sudoers.d/$USERNAME \ && apt-get autoremove -y \ && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* + +RUN mkdir $SHARED_DIR \ + ;chown :$USERNAME $SHARED_DIR \ + && chmod g+w $SHARED_DIR -RUN mkdir /shared/ -WORKDIR /shared +WORKDIR $SHARED_DIR USER $USERNAME