@@ -7,7 +7,7 @@ ARG BUILDDATE
77ARG BUILDVERSION
88MAINTAINER Pi4J "info@pi4j.com"
99
10- # docker container image labels
10+ # Docker container image labels
1111LABEL org.label-schema.schema-version="1.0"
1212LABEL org.label-schema.build-date=$BUILDDATE
1313LABEL org.label-schema.name="pi4j/pi4j-builder"
@@ -22,9 +22,6 @@ RUN echo "========================================================="
2222RUN echo " BUILDING DOCKER Pi4J v$BUILDVERSION BUILDER IMAGE FOR: $TARGETARCH"
2323RUN echo "========================================================="
2424
25- # Install sudo, needed for FFM plugin tests
26- RUN apt-get update && apt-get install -y sudo
27-
2825# ---------------------------------------------------------------------------------
2926# PROJECT BUILDER IMAGE FOR Pi4J v2.0
3027# ---------------------------------------------------------------------------------
@@ -38,15 +35,21 @@ RUN cd /pi4j && \
3835 mvn dependency:go-offline -DexcludeGroupIds=com.pi4j -Pnative && \
3936 rm -R /pi4j
4037
41- # ensure read/write access permissions to the M2 repository cache for all users
38+ # Ensure read/write access permissions to the M2 repository cache for all users
4239RUN chmod -R a+rw /.m2
4340
44- # configure environment variables
41+ # Install sudo, needed for FFM plugin tests and
42+ # add sudo permissions for GPIO simulator scripts.
43+ RUN apt-get install -y sudo
44+ RUN echo "ALL ALL=(ALL) NOPASSWD: /build/plugins/pi4j-plugin-ffm/src/test/resources/*" >> /etc/sudoers.d/gpio-simulator
45+ RUN chmod 0440 /etc/sudoers.d/gpio-simulator
46+
47+ # Configure environment variables
4548ENV PI4J_BUILDER_DATE="$BUILDDATE"
4649ENV PI4J_BUILDER="$BUILDVERSION"
4750
48- # always launch Maven to perform the build
51+ # Always launch Maven to perform the build
4952ENTRYPOINT ["mvn" ]
5053
51- # use these default parameters for the Maven build; can be overridden by caller
54+ # Use these default parameters for the Maven build; can be overridden by caller
5255CMD ["clean" , "install" , "-DskipTests" , "-Pnative,cross-compile" ]
0 commit comments