1
- FROM registry.fedoraproject.org/fedora:30 as flamel
2
1
3
- MAINTAINER Fernando Lozano <[email protected] >
2
+ FROM quay.io/flozanorht/flamel:0.3-7 as pre-commit
4
3
5
- # Adding "-subrelease" to packages, such as SLIDES="-1.2.0-1", breaks the build.
6
- # Having the dash as part of each version string allows installing whatever is latest by default, or forcing the build to use a fixed release
4
+ RUN curl https://pre-commit.com/install-local.py | python - & \
5
+ ln -s /root/bin/pre-commit /usr/bin/pre-commit & \
6
+ dnf install -y perl ruby
7
7
8
- ARG CURRICULUM="-22-1"
9
- ARG BRANDING
10
- ARG FLAMEL
11
- ARG SLIDES
12
- ARG BOOKDIR="/tmp/coursebook"
13
-
14
- # Make sure we get English error messages to share with the team.
15
-
16
- ENV LANG="en_US.utf-8" \
17
- BOOK="${BOOKDIR}"
18
-
19
- RUN curl http://wiki.gls.redhat.com/curriculum-repos/fedora/30/x86_64/curriculum-release-fedora${CURRICULUM}.fc30.noarch.rpm -o /tmp/curriculum-release-fedora${CURRICULUM}.fc30.noarch.rpm \
20
- && dnf -y install /tmp/*rpm \
21
- && rm -f /tmp/*rpm \
22
- && dnf --nodocs -y install \
23
- publican-gls-redhat-new redhat-training-xsl${BRANDING} reveal-js-slide-generator${SLIDES} \
24
- interstate-fonts overpass-fonts flamel${FLAMEL} git \
25
- && dnf clean all \
26
- && mkdir -p ${BOOK}
27
-
28
- COPY check-gls-packages.sh /tmp
29
-
30
- VOLUME ${BOOK}
8
+ FROM pre-commit
31
9
32
- WORKDIR ${BOOK}/guides
33
-
34
- # Install pre-commit in a separate container.
35
-
36
- FROM flamel as pre-commit
37
-
38
- RUN pip install --upgrade pip &&\
39
- pip install --upgrade wheel setuptools &&\
40
- pip install pre-commit
41
-
42
- # Install additional packages and interpreters
43
- FROM pre-commit as pre-commit-hooks
10
+ ARG BOOKDIR="/tmp/coursebook"
44
11
45
- RUN dnf install -y perl ruby
12
+ ENV LANG= "en_US.utf-8"
46
13
47
- # Setup ssh identities
48
- FROM pre-commit-hooks
14
+ ENTRYPOINT ["pre-commit" ]
49
15
50
- RUN mkdir /root/.ssh
51
- # COPY ssh /root/.ssh
52
- RUN chmod 0400 /root/.ssh/*
53
- WORKDIR ${BOOK}
16
+ WORKDIR ${BOOKDIR}
54
17
55
- CMD ["pre-commit" , " run" ,"-a" ]
18
+ CMD ["run" ,"-a" ]
0 commit comments