Docker Community Forums

Share and learn in the Docker community.

Docker: Message displays only unsupported, how to debug?


(Nagesinghsinghnk) #1

I am running docker on windows with linux container, and trying to push a spring boot project with docker file to heroku.

Docker file :

FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
ADD ${JAR_FILE} forceCI-0.0.1-SNAPSHOT.jar
ENTRYPOINT [“java”,”-Djava.security.egd=file:/dev/./urandom”,”-jar”,”/forceCI-0.0.1-SNAPSHOT.jar”]

Pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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.forceCI</groupId>
	<artifactId>forceCI</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>forceCI</name>
	<description>Demo project for Spring Boot</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.5.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<docker.image.prefix>forceci</docker.image.prefix>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jersey</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.restdocs</groupId>
			<artifactId>spring-restdocs-mockmvc</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>4.4.9</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.json/json -->
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20090211</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.0</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.kohsuke/github-api -->
		<dependency>
			<groupId>org.kohsuke</groupId>
			<artifactId>github-api</artifactId>
			<version>1.94</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.sparkjava/spark-core -->
		<dependency>
			<groupId>com.sparkjava</groupId>
			<artifactId>spark-core</artifactId>
			<version>2.8.0</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.ant/ant -->
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
			<version>1.10.5</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.ant/ant-launcher -->
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant-launcher</artifactId>
			<version>1.10.5</version>
		</dependency>



	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>


</project>

Now from cli, i typed the following.

heroku login
heroku container:login
heroku create forceci
docker build -t force_ci:v1 .

C:\ForceCI\forceCI\forceCI>docker images                
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
force_ci            v1                  36256495fa8f        26 seconds ago      150MB
openjdk             8-jdk-alpine        54ae553cb104        5 weeks ago         103MB

Now I did heroku container:push web --app forceci:

C:\ForceCI\forceCI\forceCI>heroku container:push web --app forceci         
=== Building web (C:\ForceCI\forceCI\forceCI\Dockerfile)
Sending build context to Docker daemon  47.44MB
Step 1/5 : FROM openjdk:8-jdk-alpine
 ---> 54ae553cb104
Step 2/5 : VOLUME /tmp
 ---> Using cache
 ---> 336a1d2d2af5
Step 3/5 : ARG JAR_FILE
 ---> Using cache
 ---> 1d5639ba8638
Step 4/5 : ADD ${JAR_FILE} forceCI-0.0.1-SNAPSHOT.jar
 ---> Using cache
 ---> 02d8baa57cfd
Step 5/5 : ENTRYPOINT [“java”,”-Djava.security.egd=file:/dev/./urandom”,”-jar”,”/forceCI-0.0.1-SNAPSHOT.jar”]
 ---> Using cache
 ---> 36256495fa8f
Successfully built 36256495fa8f
Successfully tagged registry.heroku.com/forceci/web:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions fo
r sensitive files and directories.
=== Pushing web (C:\ForceCI\forceCI\forceCI\Dockerfile)
The push refers to repository [registry.heroku.com/forceci/web]
39c03b6d47b3: Pushed
f2ec1bba02a6: Layer already exists
0c3170905795: Layer already exists
df64d3292fd6: Layer already exists
unsupported
 !    Error: docker push exited with 1

I get error unsupported.

Now I did docker images to check what images have been build, and I got this:

C:\ForceCI\forceCI\forceCI>docker images                                   
REPOSITORY                        TAG                 IMAGE ID            CREATED             SIZE
force_ci                          v1                  36256495fa8f        6 minutes ago       150MB
registry.heroku.com/forceci/web   latest              36256495fa8f        6 minutes ago       150MB
openjdk                           8-jdk-alpine        54ae553cb104        5 weeks ago         103MB

Then I thought to push the already built images to heroku, but still got the unsupported message.

C:\ForceCI\forceCI\forceCI>docker tag force_ci:v1 registry.heroku.com/forceci/web           

C:\ForceCI\forceCI\forceCI>docker push registry.heroku.com/forceci/web         
The push refers to repository [registry.heroku.com/forceci/web]
39c03b6d47b3: Layer already exists
f2ec1bba02a6: Layer already exists
0c3170905795: Layer already exists
df64d3292fd6: Layer already exists
unsupported

Can someone help here?
Docker version : Version: 18.09.0-ce-beta1