Skip to content

Instantly share code, notes, and snippets.

Luke Patterson lukewpatterson

  • Kansas USA
Block or report user

Report or block lukewpatterson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deleteOrphanedDockerComponentsAndAssets.groovy
import groovy.json.JsonSlurper
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.StorageFacet
def DOCKER_REPOSITORY_NAME = 'docker-hosted'
def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME)
def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName)
def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get()
try {
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.keyholesoftware.blog</groupId>
<artifactId>khs-docker-caching-blog</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
View Dockerfile
FROM maven:3.2.5-jdk-8u40
RUN mkdir --parents /usr/src/app
WORKDIR /usr/src/app
# selectively add the POM file
ADD pom.xml /usr/src/app/
# get all the downloads out of the way
RUN mvn verify clean --fail-never
View App.java
package com.keyholesoftware.blog;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
View App.java
package com.keyholesoftware.blog;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
View App.java
package com.keyholesoftware.blog;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
View App.java
package com.keyholesoftware.blog;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
View gist:7bc01869fb9fbea9c0bc
khs-docker-caching-blog$ docker build .
Sending build context to Docker daemon 2.633 MB
Sending build context to Docker daemon
Step 0 : FROM maven:3.2.5-jdk-8u40
---> cef499116951
Step 1 : RUN mkdir --parents /usr/src/app
---> Using cache
---> 43927e63fa7d
Step 2 : WORKDIR /usr/src/app
---> Using cache
View gist:b1843089b9e9f73acec5
khs-docker-caching-blog$ docker build .
Sending build context to Docker daemon 2.633 MB
Sending build context to Docker daemon
Step 0 : FROM maven:3.2.5-jdk-8u40
---> cef499116951
Step 1 : RUN mkdir --parents /usr/src/app
---> Using cache
---> 43927e63fa7d
Step 2 : WORKDIR /usr/src/app
---> Using cache
View config.json
{
"vars": {
"@gray-darker": "lighten(#000, 45.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
You can’t perform that action at this time.