build: expose current jt808 docker port
This commit is contained in:
@@ -10,6 +10,6 @@ ENV JAVA_OPTS=""
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY modules/apps/${APP_NAME}/target/${APP_NAME}.jar /app/app.jar
|
COPY modules/apps/${APP_NAME}/target/${APP_NAME}.jar /app/app.jar
|
||||||
|
|
||||||
EXPOSE 20100 20200 20300 20400 20500 32960 10808
|
EXPOSE 20100 20200 20300 20400 20500 32960 808
|
||||||
|
|
||||||
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/app.jar"]
|
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/app.jar"]
|
||||||
|
|||||||
@@ -23,6 +23,16 @@ class WoodpeckerPipelineTest {
|
|||||||
assertThat(countOccurrences(pipeline, "- name: docker-build-")).isEqualTo(1);
|
assertThat(countOccurrences(pipeline, "- name: docker-build-")).isEqualTo(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void dockerImageExposesOnlyCurrentProductionPorts() throws IOException {
|
||||||
|
String dockerfile = Files.readString(repositoryRoot().resolve("Dockerfile"));
|
||||||
|
|
||||||
|
assertThat(dockerfile)
|
||||||
|
.contains("EXPOSE 20100 20200 20300 20400 20500 32960 808")
|
||||||
|
.doesNotContain("10808")
|
||||||
|
.doesNotContain("8089");
|
||||||
|
}
|
||||||
|
|
||||||
private static int countOccurrences(String value, String needle) {
|
private static int countOccurrences(String value, String needle) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int from = 0;
|
int from = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user