diff --git a/.gitignore b/.gitignore index a5756bd0..c753aed9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ temp template .DS_Store *.zip -node_modules \ No newline at end of file +node_modules + +.idea diff --git a/Dockerfile b/Dockerfile index 3a440163..4180ed63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,32 @@ -FROM jruby:9.2.18.0-jdk11 as build-image +FROM alpine:3.13 as build-image -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y build-essential npm \ - && apt-get install -y iputils-ping \ - && apt-get autoremove --purge -y \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* +WORKDIR /build +RUN apk update \ + && apk upgrade \ + && apk add --no-cache \ + build-base \ + npm \ + curl \ + iputils \ + ruby-full \ + ruby-dev \ + openjdk8 \ + bash RUN gem install jekyll - RUN npm install -g fsh-sushi -WORKDIR /build - COPY _updatePublisher_curl.sh _updatePublisher_curl.sh COPY _genonce.sh _genonce.sh +RUN ./_updatePublisher_curl.sh -y + COPY input input COPY ig.ini ig.ini COPY sushi-config.yaml sushi-config.yaml COPY package-list.json package-list.json -RUN ./_updatePublisher_curl.sh -y || echo "ok" - +RUN chmod +x _genonce.sh RUN ./_genonce.sh -y FROM alpine:3.13 @@ -35,4 +38,4 @@ RUN chmod +x /app/docker-entrypoint.sh COPY --from=build-image /build /app -ENTRYPOINT ["/app/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/_updatePublisher.sh b/_updatePublisher.sh index e28128be..0fcd5e0c 100755 --- a/_updatePublisher.sh +++ b/_updatePublisher.sh @@ -32,7 +32,7 @@ done echo "Checking internet connection" case "$OSTYPE" in - linux-gnu* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;; + linux* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;; darwin* ) ping tx.fhir.org -c 1 >/dev/null ;; *) echo "unknown: $OSTYPE"; exit 1 ;; esac diff --git a/_updatePublisher_curl.sh b/_updatePublisher_curl.sh index 844980b9..f6142355 100755 --- a/_updatePublisher_curl.sh +++ b/_updatePublisher_curl.sh @@ -32,7 +32,7 @@ done echo "Checking internet connection" case "$OSTYPE" in - linux-gnu* ) curl -sSf tx.fhir.org > /dev/null ;; + linux* ) curl -sSf tx.fhir.org > /dev/null ;; darwin* ) ping tx.fhir.org -c 1 >/dev/null ;; *) echo "unknown: $OSTYPE"; exit 1 ;; esac