1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ # for testing in a container that is similar to the github action linux build environment
17+ # run this from the root of the project
18+ # `docker build -t grails:testing -f etc/bin/Dockerfile . && docker run -it --rm -v $(pwd):/home/groovy/project grails:testing bash`
19+ FROM bellsoft/liberica-openjdk-debian:17.0.14
20+
21+ USER root
22+ RUN apt-get update && apt-get install -y curl unzip coreutils libdigest-sha-perl gpg vim sudo psmisc locales groovy rsync
23+
24+ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
25+ dpkg-reconfigure --frontend=noninteractive locales && \
26+ update-locale LANG=en_US.UTF-8
27+
28+ RUN useradd --system --create-home --home-dir /home/groovy groovy
29+ RUN usermod -s /bin/bash -g root -G sudo groovy
30+ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
31+ USER groovy
32+
33+ WORKDIR /home/groovy
34+ RUN mkdir -p /home/groovy/scripts/etc/bin && mkdir -p /home/groovy/scripts/gradle/wrapper && mkdir -p /home/groovy/grails-verify && mkdir -p /home/groovy/project
35+ ADD --chown=groovy etc/bin /home/groovy/scripts/etc/bin
36+ ADD --chown=groovy gradlew /home/groovy/scripts
37+ ADD --chown=groovy gradle/wrapper/gradle-wrapper.jar /home/groovy/scripts/gradle/wrapper
38+ ADD --chown=groovy gradle/wrapper/gradle-wrapper.properties /home/groovy/scripts/gradle/wrapper
39+ ENV PATH="/home/groovy/scripts:/home/groovy/scripts/etc/bin:$PATH"
40+ ENV CI=true
41+ ENV LANG=C.UTF-8
42+ ENV LC_ALL=en_US.UTF-8
43+ ENV LC_CTYPE=en_US.UTF-8
44+
45+ CMD ["/bin/bash" , "-ec" , "while :; do echo '.'; sleep 1000 ; done" ]
0 commit comments