Skip to content
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

Move Docker image to new repo, use dev-only image #38

Merged
merged 1 commit into from
Jun 30, 2020
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
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

19 changes: 19 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# clitest-dev
# Local Docker image used for clitest development.
#
# It has all the required tools for linting and testing clitest code.
# See Makefile for commands to build and run this image.
#
# If you're searching for the official clitest Docker image (for users):
# https://hub.docker.com/r/aureliojargas/clitest

FROM alpine:3.11

# Perl is required by clitest's --regex matching mode
RUN apk --no-cache add \
bash dash mksh zsh \
perl \
make \
checkbashisms shellcheck

WORKDIR /mnt
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Developer workflow: run locally the same commands Travis will run in
# the CI. See the .travis.yml file for the list of commands.
#
# By default, the linting and testing targets are run inside the clitest
# Docker container. To run them directly on the host, avoiding the
# container, unset the `docker_run` variable. Examples:
# By default, the linting and testing targets are run inside the
# clitest-dev Docker container. To run them directly on the host,
# avoiding the container, unset the `docker_run` variable. Examples:
#
# make test-bash # test using container's bash
# make test-bash docker_run= # test using host's bash

docker_image = aureliojargas/clitest
docker_run = docker run --rm -it -v $$PWD:/clitest $(docker_image)
test_cmd = clitest --first --progress none test.md
docker_image = clitest-dev
docker_run = docker run --rm -it -v $$PWD:/mnt $(docker_image)
test_cmd = ./clitest --first --progress none test.md

default:
@echo "Read the comments in the Makefile for help"
Expand All @@ -27,7 +27,7 @@ versions:
@$(docker_run) sh -c 'apk list 2>/dev/null | cut -d " " -f 1 | sort'

docker-build:
docker build -t $(docker_image) .
docker build -t $(docker_image) -f Dockerfile.dev .

docker-run:
$(docker_run) $(cmd)
118 changes: 0 additions & 118 deletions README-docker.md

This file was deleted.

17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ sudo mv clitest /usr/bin

Now check if everything is fine:

```console
$ clitest -V
clitest HEAD
https://github.com/aureliojargas/clitest/tree/HEAD
$
```
clitest --help
```


## Docker image

You can also run clitest in a Docker container ([more info in Docker Hub](https://hub.docker.com/r/aureliojargas/clitest)).

```
docker run --rm -t aureliojargas/clitest --help
```


## Quick Intro

Expand Down