1

Hola estoy montando un contenedor docker para el wso2Ei y estoy teniendo error Permision Denied.

Mi docker file es este:

# ------------------------------------------------------------------------
#
# Copyright 2017 WSO2, Inc. (http://wso2.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
#
# ------------------------------------------------------------------------

# set to latest Ubuntu LTS
FROM ubuntu:16.04
MAINTAINER WSO2 Docker Maintainers "[email protected]"

# set user configurations
ARG USER=wso2carbon
ARG USER_ID=802
ARG USER_GROUP=wso2
ARG USER_GROUP_ID=802
ARG USER_HOME=/home/${USER}
# set dependant files directory
ARG FILES=./files
# set wso2 product configurations
ARG WSO2_SERVER=wso2ei
ARG WSO2_SERVER_VERSION=6.2.0
ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION}
ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}
# set jdk configurations
ARG JDK_DIST=jdk1.8.0*
ARG JAVA_HOME=${USER_HOME}/java

# install required packages
RUN echo "deb http://192.168.10.18/ubuntu xenial main restricted universe multiverse" > /etc/apt/sources.list
RUN echo "deb http://192.168.10.18/ubuntu xenial-security main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://192.168.10.18/ubuntu xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://192.168.10.18/ubuntu xenial-proposed main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://192.168.10.18/ubuntu xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
    unzip telnet iproute2 curl && \
    rm -rf /var/lib/apt/lists/*

# create a user group and a user
RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \
    useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER}

# copy the jdk and wso2 product distributions to user's home directory
COPY ${FILES}/${JDK_DIST} ${JAVA_HOME}
COPY ${FILES}/${WSO2_SERVER_DIST} ${WSO2_SERVER_HOME}
RUN chown -R wso2carbon:wso2  ${JAVA_HOME}
RUN chown -R wso2carbon:wso2  ${WSO2_SERVER_HOME}   

#COPY --chown=wso2carbon:wso2 ${FILES}/${JDK_DIST} ${JAVA_HOME}
#COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${WSO2_SERVER_HOME}

# set the user and work directory
USER ${USER}
WORKDIR ${USER_HOME}

# set environment variables
ENV JAVA_HOME=${JAVA_HOME} \
    PATH=$JAVA_HOME/bin:$PATH \
    WSO2_SERVER_HOME=${WSO2_SERVER_HOME}    

# expose integrator ports
EXPOSE 8280 8243 9443

# set entrypoint to integrator startup script
ENTRYPOINT ${WSO2_SERVER_HOME}/bin/integrator.sh

y el comando run q ejecuto para crear el contenedor es este

docker run -it -p 8243:8243 -p 8280:8280 -p 9443:9443 -v /home/integro/ei/bin/:/home/wso2carbon/wso2ei/bin --name wso2ei wso2ei:6.2.0

Cuando docker crea el contenedor pero da este error

/bin/sh: 1: /home/wso2carbon/wso2ei/bin/integrator.sh: Permission denied

pero si le quito el volumen no me da error

1 respuesta 1

0

Debe ser un problema de permisos en la carpeta local de tu pc a la que estas mapeando, desde el terminal revisa los permisos de tu carpeta con ls -l /home/integro/ei/ y mira los permisos de la carpeta bin, la otra pueba que puedes hacer es darle permiso a todos en la carpeta local con sudo chmod -R 777 /home/integro/ei/bin/ OJO: SOLO PARA PRUEBA ya que los permisos 777 no deben estar en cualquier carpeta.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.