Skip to content

Commit 73374a5

Browse files
committed
Attempted Docker file
1 parent 5fc9180 commit 73374a5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM apiaryio/drafter:latest as drafter
2+
FROM composer:latest as composer
3+
4+
FROM php:7.4-cli-alpine as build
5+
RUN apk add --no-cache \
6+
$PHPIZE_DEPS \
7+
openssl-dev
8+
RUN pecl install uopz \
9+
&& docker-php-ext-enable uopz
10+
RUN echo "phar.readonly = 0" > "$PHP_INI_DIR/conf.d/phar.ini"
11+
COPY --from=composer /usr/bin/composer /usr/bin/composer
12+
COPY . /usr/src/phpdraft
13+
WORKDIR /usr/src/phpdraft
14+
RUN /usr/bin/composer install
15+
RUN vendor/bin/phing phar-nightly
16+
COPY build/out/phpdraft-nightly.phar /usr/local/bin/phpdraft
17+
18+
FROM php:7.4-cli-alpine
19+
LABEL maintainer="Sean Molenaar [email protected]"
20+
RUN apk add --no-cache gcc
21+
COPY --from=drafter /usr/local/bin/drafter /usr/local/bin/drafter
22+
COPY --from=build /usr/local/bin/phpdraft /usr/local/bin/phpdraft
23+
ENTRYPOINT /usr/local/bin/phpdraft -f /tmp/drafter/full_test.apib

0 commit comments

Comments
 (0)