Skip to content

Commit

Permalink
Refactor for SCING
Browse files Browse the repository at this point in the history
  • Loading branch information
hisplan committed Aug 2, 2021
1 parent cce1a78 commit daa0db0
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@

*.log
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

Dockerized pigz, a parallel implementation of gzip for modern multi-processor, multi-core machines

## How to Run

```bash
docker run -it --rm pigz:2.4
```

## Build Container Image

```bash
./build.sh
```

## Push to Docker Registry

Either you can use the `docker push` command or run `push.sh` (requires [scing](https://github.com/hisplan/scing)):

```bash
./push.sh
```
12 changes: 11 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash
#!/bin/bash -e

source config.sh

docker build -t ${image_name}:${version} .

# hack: comment the ENTRYPOINT and CMD lines to make it work for cromwell
# this will generate `Dockerfile.cromwell` and build it under the name `cromwell-${image_name}:${version}`
# https://github.com/broadinstitute/cromwell/issues/2461
cat Dockerfile \
| sed 's/^ENTRYPOINT \[/# ENTRYPOINT \[/g' \
| sed 's/^CMD \[/# CMD \[/g' > Dockerfile.cromwell

# build it
docker build -t cromwell-${image_name}:${version} -f Dockerfile.cromwell .
6 changes: 1 addition & 5 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
version="2.4"

# docker related
registry="583643567512.dkr.ecr.us-east-1.amazonaws.com"
registry="quay.io/hisplan"
image_name="pigz"

# set this to 1 if you want to create a repository in AWS ECR
# set this to 0 for Docker Hub
create_ecr_repo=1
36 changes: 0 additions & 36 deletions package-for-cromwell.sh

This file was deleted.

17 changes: 0 additions & 17 deletions package.sh

This file was deleted.

8 changes: 8 additions & 0 deletions push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

source config.sh

echo "${registry}/${image_name}:${version}"

scing push --image=${registry}/${image_name}:${version}
scing push --image=${registry}/cromwell-${image_name}:${version}

0 comments on commit daa0db0

Please sign in to comment.