Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get past permission denied error on nexus.lock file #51

Open
vbagley opened this issue Mar 2, 2017 · 1 comment
Open

can not get past permission denied error on nexus.lock file #51

vbagley opened this issue Mar 2, 2017 · 1 comment

Comments

@vbagley
Copy link

vbagley commented Mar 2, 2017

I am trying to get docker/nexus to run, but I am running into this error: 2017-03-02 10:49:24,609-0500 WARN [jetty-main-1] *SYSTEM org.sonatype.nexus.util.LockFile - Failed to write lock file
java.io.FileNotFoundException: /opt/sonatype/nexus/nexus.lock (Permission denied)

Below is my dockerfile:
FROM dock.it.vt.edu:1100/java8:v8u121VT03
ARG BUILD_DATE
ARG PARENT
ARG VCS_REF
ARG VCS_URL
ARG VERSION
LABEL org.label-schema.vendor="DBAA dbaa@vt.edu"
org.label-schema.name="Nexus"
org.label-schema.description="Base image for Nexus"
org.label-schema.build-date=$BUILD_DATE
org.label-schema.vcs-ref=$VCS_REF
org.label-schema.vcs-url=$VCS_URL
org.label-schema.version=$VERSION
org.label-schema.parent=$PARENT
org.label-schema.schema-version="1.0"

USER root

ARG NEXUS_VERSION=2.14.3-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/oss/nexus-${NEXUS_VERSION}-bundle.tar.gz
ARG NEXUS_SHA1=87c1e9b0d50dbc17d2a771ce7d98ebcf67fd140a

ENV WORKDIR /opt
ENV PATH=$WORKDIR:$PATH

do all in one step

RUN set -ex &&
mkdir -p ${WORKDIR}/sonatype/nexus
&& curl --fail --silent --location --retry 3
${NEXUS_DOWNLOAD_URL}
| gunzip
| tar -x -C /tmp nexus-${NEXUS_VERSION}
&& mv /tmp/nexus-${NEXUS_VERSION}/* ${WORKDIR}/sonatype/nexus/ \

&& chgrp -R appsadm ${WORKDIR} \

&& rm -rf /tmp/nexus-${NEXUS_VERSION}

USER appsadm

EXPOSE 8081
WORKDIR /opt/sonatype/nexus

ENV CONTEXT_PATH /nexus
ENV MAX_HEAP 768m
ENV MIN_HEAP 256m
ENV JAVA_OPTS -server -Djava.net.preferIPv4Stack=true
ENV LAUNCHER_CONF ./conf/jetty.xml ./conf/jetty-requestlog.xml
CMD ${JAVA_HOME}/bin/java
-Dnexus-work=${SONATYPE_WORK} -Dnexus-webapp-context-path=${CONTEXT_PATH}
-Xms${MIN_HEAP} -Xmx${MAX_HEAP}
-cp 'conf/:lib/*'
${JAVA_OPTS}
org.sonatype.nexus.bootstrap.Launcher ${LAUNCHER_CONF}

And yes I know I am using appsadm user. Any help would be appreciated.

@vbagley vbagley changed the title can not get pass permission denied error on nexus.lock file can not get past permission denied error on nexus.lock file Mar 2, 2017
@waterdrops
Copy link

there is a temporary solution, plz refer to OpenShiftDemos/nexus#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants