Skip to content

Commit b0b455a

Browse files
committedNov 21, 2022
Some minor docker fixes and improvements, cleanup image
1 parent a219dbd commit b0b455a

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed
 

‎.dockerignore

+8
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ Dockerfile
99
.envrc
1010
.ghci
1111
.gitignore
12+
./*.ll
13+
./*.o
14+
./*.a
15+
./*.wasm
16+
./*.eclair
17+
./*.dl
18+
./logo*
19+
hie.yaml

‎.github/workflows/build.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ jobs:
1212
run: |
1313
set -eo pipefail
1414
docker build -f Dockerfile . -t eclair | tee eclair-lang-${{matrix.os}}.log
15-
# We remove Eclair from /usr/bin. It is not needed for CI, and this
16-
# caused some weird issues due to invoking cabal concurrently.
17-
docker run --rm eclair bash -c "rm /usr/bin/eclair; make test" | tee -a eclair-lang-${{matrix.os}}.log
15+
docker run --rm eclair bash -c "make test" | tee -a eclair-lang-${{matrix.os}}.log
1816
- name: Upload logs
1917
if: ${{ always() }}
2018
uses: actions/upload-artifact@v2

‎Dockerfile

+8-6
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,18 @@ WORKDIR /app/build
4545
ENV DATALOG_DIR=/app/build/cbits
4646

4747
RUN echo -e '#!/bin/bash\nsource /root/.ghcup/env\nsource /root/.nvm/nvm.sh\nexec "$@"\n' > /app/build/entrypoint.sh \
48-
&& chmod u+x /app/build/entrypoint.sh \
49-
&& echo -e '#!/bin/bash\nsource /root/.ghcup/env\nECLAIR=`cabal list-bin eclair`\n$ECLAIR "$@"' > /usr/bin/eclair \
50-
&& chmod u+x /usr/bin/eclair
48+
&& chmod u+x /app/build/entrypoint.sh
5149

5250
# The entrypoint script sources ghcup setup script so we can easily call cabal etc.
5351
ENTRYPOINT [ "/app/build/entrypoint.sh" ]
5452

55-
# The default command to run, shows the help menu
56-
CMD [ "eclair", "--help" ]
57-
5853
COPY . .
5954

6055
RUN source /root/.ghcup/env && make build
56+
RUN echo -e '#!/bin/bash\nsource /root/.ghcup/env\n' > /usr/bin/eclair \
57+
&& source /root/.ghcup/env \
58+
&& echo -e "`cabal list-bin eclair` \"\$@\"" >> /usr/bin/eclair \
59+
&& chmod u+x /usr/bin/eclair
60+
61+
# The default command to run, shows the help menu
62+
CMD [ "eclair", "--help" ]

0 commit comments

Comments
 (0)
Please sign in to comment.