Skip to content

Reduce image size #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Workflow
on: push
jobs:
docker:
name: Docker
strategy:
matrix:
ghc:
- 9.0.2
name: Docker with GHC ${{ matrix.ghc }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -13,14 +17,19 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=false
tags: type=sha,format=long
tags: |
type=sha,format=long,prefix=${{ matrix.ghc }}-
type=raw,value=${{ matrix.ghc }},enable={{ is_default_branch }}
- uses: docker/login-action@v2
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
- uses: docker/build-push-action@v3
with:
build-args: GHC_VERSION=${{ matrix.ghc }}
cache-from: type=gha
cache-to: type=gha,mode=max
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ARG GHC_VERSION=9.0.2
RUN \
set -o errexit -o xtrace; \
ghcup install ghc "$GHC_VERSION" --set; \
ghcup gc --profiling-libs --share-dir; \
ghc --version

# Install Cabal.
Expand All @@ -80,6 +81,7 @@ ARG HLS_VERSION=1.7.0.0
RUN \
set -o errexit -o xtrace; \
ghcup install hls "$HLS_VERSION" --set; \
ghcup gc --hls-no-ghc; \
haskell-language-server-wrapper --version

# Configure Cabal.
Expand Down
9 changes: 9 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# docker-haskell

This Docker image provides a Haskell development environment with the following tools:

- [GHCup](https://www.haskell.org/ghcup/)
- [GHC](https://www.haskell.org/ghc/)
- [Cabal](https://www.haskell.org/cabal/)
- [Stack](https://docs.haskellstack.org/en/stable/README/)
- [HLS](https://haskell-language-server.readthedocs.io/en/latest/)