Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/.vscode
.DS_Store
.idea
schema-ts-files

25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# start with the official Composer image and name it
FROM composer:lts AS composer

# continue with the official PHP image
FROM php:7.4.9

# copy the Composer PHAR from the Composer image into the PHP image
COPY --from=composer /usr/bin/composer /usr/bin/composer

## Add packages
RUN apt-get update\
&& apt-get install -y --no-install-recommends git\
libzip-dev\
zip\
&& docker-php-ext-install zip;\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ARG APP_NAME=raml-ts
RUN mkdir -p /opt2/${APP_NAME}
WORKDIR /opt2/${APP_NAME}

# show that both Composer and PHP run as expected
#RUN composer --version && php -v

ENTRYPOINT ["sh", "-c", "composer install && php download-schema @app/api \"$RAML_URL\" ./schema-ts-files"]
3 changes: 3 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker build -t marcura/raml-ts .
5 changes: 5 additions & 0 deletions docker-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo "Usage docker-run.sh <raml url example https://raw.githubusercontent.com/Marcura/dadesk-module-table-management/master/src/main/resources/tablemanagement-api.raml?token=GHSA...>"

docker run -it -v ./:/opt2/raml-ts --env RAML_URL="$1" marcura/raml-ts