Entradas

Mostrando las entradas etiquetadas como comandos

Create a docker image from a spring boot project

In order to create a docker image from a spring boot project, First, your pom.xml has to be configured. <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!-- Cofiguration for creating a docker image --> <image> <name>chamow01/${project.artifactId}</name> </image> </configuration> </plugin> </plugins> </build> Then, the next maven command needs to be applied, so spring boot uses paketo-buildpacks in order to create a docker image based on you Java code mvn spring-boot:build-image ... [INFO] > Running creator [INFO] [creator] ===> DETECTING [INFO] [creator] 6 of 24 buildpacks participating [INFO] [creator] paketo-buildpacks/ca-certificates 3.2.0 [INFO] [creator] paketo-buildpacks/bellsoft-liberica 9.3.2 [INFO] ...

Comandos docker

A continuación se detalla un listado de comandos para Docker Comando Descripción Ejemplo Básicos docker --version Versión de docker docker --version docker info Información sobre el entrono de docker docker info docker login Para iniciar sesión en hub docker Imagenes docker images Lista las imagenes instaladas docker image inspect id_image Información detalla de la imagen docker image inspect 7adf docker pull Obtiene e instala una imagen desde hub docker docker pull ubuntu docker rmi Elimina una imagen instalada docker rmi ubuntu Contenedores ...