Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-muehle committed Jan 28, 2019
0 parents commit fd370ec
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: bash
services: docker

before_install:
- make

script:
- make test

notifications:
email: false
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all: build test

.PHONY: build
build:
@echo ">> Building image"
docker build -t dockerizedphp/phpmnd latest/

.PHONY: test
test:
@echo ">> Run test"
docker run --rm -i dockerizedphp/phpmnd --version
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Docker image for [PHPMND](https://github.com/povils/phpmnd) - PHP Magic Number Detector

[![Build Status](https://travis-ci.org/dockerized-php/phpmnd.svg?branch=master)](https://travis-ci.org/dockerized-php/phpmnd)
[![Docker Pulls](https://img.shields.io/docker/pulls/dockerizedphp/phpmnd.svg)](https://hub.docker.com/r/dockerizedphp/phpmnd)

The image is based on [Alpine Linux](https://alpinelinux.org/) and built daily.

## Supported tags

- `latest` [(latest/Dockerfile)](latest/Dockerfile)

## How to use this image

### Install

Install the container:

```
docker pull dockerizedphp/phpmnd
```

### Usage

We are recommend to use the images as an shell alias to access via short-command.
To use simply *phpmnd* everywhere on CLI add this line to your ~/.zshrc, ~/.bashrc or ~/.profile.

```
alias phpmnd='docker run -v $PWD:/app --rm dockerizedphp/phpmnd'
```

If you don't have set the alias, use this command to run the container:

```
docker run --rm -v /path/to/app:/app dockerizedphp/phpmnd [some arguments for PHPMND]
```

For example:

```
docker run --rm -v /path/to/app:/app dockerizedphp/phpmnd --version
```
25 changes: 25 additions & 0 deletions latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM alpine:3.8
MAINTAINER Tommy Muehle <tommy.muehle@gmail.com>

ENV COMPOSER_HOME /composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV PATH /composer/vendor/bin:$PATH

RUN apk --update --progress --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.8/community add \
php7 \
php7-dom \
php7-json \
php7-phar \
php7-mbstring \
php7-openssl \
php7-tokenizer

COPY --from=composer:1.8.0 /usr/bin/composer /usr/local/bin/composer

RUN composer global require povils/phpmnd \
&& composer global show | grep phpmnd

VOLUME ["/app"]
WORKDIR /app

ENTRYPOINT ["phpmnd"]

0 comments on commit fd370ec

Please sign in to comment.