Skip to content

Commit 71bef4a

Browse files
committed
Add basic Dockerfile
1 parent 2fda6ba commit 71bef4a

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.git
2+
docs
3+
tests
4+
build

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ------------------------------------
2+
# Nuild stage
3+
# ------------------------------------
4+
FROM composer/composer:2 as build
5+
WORKDIR /app
6+
7+
# Install dependencies
8+
COPY composer.json ./
9+
RUN composer install --no-dev --no-autoloader --no-scripts --ignore-platform-reqs
10+
COPY . .
11+
RUN composer install --no-dev --optimize-autoloader --ignore-platform-reqs
12+
13+
14+
# ------------------------------------
15+
# Runtime stage
16+
# ------------------------------------
17+
FROM php:7-fpm-alpine as runtime
18+
19+
# System dependencies
20+
RUN apk add --update libxslt-dev
21+
RUN docker-php-ext-install xsl soap
22+
23+
# Copy source code
24+
WORKDIR /app
25+
COPY --from=build /app .
26+
27+
ENTRYPOINT ["bin/cfditopdf"]
28+
CMD ["--help"]

0 commit comments

Comments
 (0)