-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEXUS-20366 - Use UBI8 instead of CentOS (#111)
- Loading branch information
1 parent
0f4ff59
commit 37a9fcd
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,10 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM centos:centos7 | ||
|
||
MAINTAINER Sonatype <[email protected]> | ||
FROM registry.access.redhat.com/ubi8/ubi | ||
|
||
LABEL vendor=Sonatype \ | ||
maintainer="Sonatype <[email protected]>" \ | ||
com.sonatype.license="Apache License, Version 2.0" \ | ||
com.sonatype.name="Nexus Repository Manager base image" | ||
|
||
|
@@ -30,7 +29,7 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \ | |
NEXUS_DATA=/nexus-data \ | ||
NEXUS_CONTEXT='' \ | ||
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \ | ||
DOCKER_TYPE='docker' | ||
DOCKER_TYPE='rh-docker' | ||
|
||
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe" | ||
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz" | ||
|
@@ -39,17 +38,18 @@ ADD solo.json.erb /var/chef/solo.json.erb | |
|
||
# Install using chef-solo | ||
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image | ||
RUN curl -L https://www.getchef.com/chef/install.sh | bash -s -- -v 14.12.9 \ | ||
RUN yum install -y --disableplugin=subscription-manager hostname procps \ | ||
&& curl -L https://www.getchef.com/chef/install.sh | bash -s -- -v 14.12.9 \ | ||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \ | ||
&& chef-solo \ | ||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \ | ||
--json-attributes /var/chef/solo.json \ | ||
&& rpm -qa *chef* | xargs rpm -e \ | ||
&& rpm --rebuilddb \ | ||
&& rm -rf /etc/chef \ | ||
&& rm -rf /opt/chefdk \ | ||
&& rm -rf /var/cache/yum \ | ||
&& rm -rf /var/chef | ||
&& rm -rf /var/chef \ | ||
&& yum clean all | ||
|
||
VOLUME ${NEXUS_DATA} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters