-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
29 lines (22 loc) · 856 Bytes
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Contenedor base
FROM openjdk:8-jdk-alpine
# Informacion de autor
LABEL autor="Raul Del Pozo Moreno"
LABEL email="rauldpm@correo.ugr.es"
# Establece la version de gradle a usar
ENV GRADLE_VERSION 6.7
# Establece el directorio de trabajo para la instalacion de Gradle
WORKDIR /opt
# Descarga zip de gradle
RUN wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip
# Descomprime la descarga en /opt para su uso directo
RUN unzip gradle-$GRADLE_VERSION-bin.zip -d /opt
# Elimina el zip de descarga
RUN rm -f gradle-$GRADLE_VERSION-bin.zip
# Establece variables de entorno necesarias para la ejecucion
ENV GRADLE_HOME /opt/gradle-$GRADLE_VERSION
ENV PATH $PATH:/opt/gradle-$GRADLE_VERSION/bin
# Establece el directorio de trabajo
WORKDIR /test
# Establece la accion a realizar al ejecutar docker
CMD gradle test && gradle clean