Skip to content

Commit

Permalink
add docker/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
msakai committed Aug 9, 2022
1 parent 33aff7a commit 909b0ce
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Dockerfile usage

## Building docker image for a released version

### Example

```
$ docker build -t TAG -f docker/Dockerfile .
```

### Examples with explicit specifications

```
$ docker build --platform linux/amd64 --build-arg GHC_VERSION=9.0.2 --build-arg TOYSOLVER_VERSION=0.8.0 -t TAG -f docker/Dockerfile .
```

```
$ docker build --platform linux/arm64 --build-arg GHC_VERSION=9.2 --build-arg TOYSOLVER_VERSION=0.8.0 -t TAG -f docker/Dockerfile .
```

## Building docker image from working directory

Using stack:
```
$ stack sdist
$ cp $(stack path --dist-dir)/toysolver-*.tar.gz toysolver.tar.gz
$ docker build -t TAG -f docker/working-dir.Dockerfile .
```

Using cabal:
```
$ cabal sdist
$ cp dist-newstyle/sdist/toysolver-*.tar.gz toysolver.tar.gz
$ docker build -t TAG -f docker/working-dir.Dockerfile .
```

0 comments on commit 909b0ce

Please sign in to comment.