This repository has been archived by the owner on Dec 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from pion/issue-79
Reduce ion-web size
- Loading branch information
Showing
1 changed file
with
16 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
FROM node:12.16.0-buster-slim | ||
FROM alpine | ||
|
||
WORKDIR /app | ||
COPY ./sdk/js/package.json ./ | ||
RUN npm install | ||
|
||
COPY ./sdk/js/demo/package.json ./demo/ | ||
WORKDIR /app/demo | ||
RUN npm install | ||
|
||
WORKDIR /app | ||
COPY ./sdk/js ./ | ||
|
||
WORKDIR /app/demo | ||
RUN npm run build | ||
ENV ENABLE_TELEMETRY="false" | ||
WORKDIR /usr/src/ion | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY ./sdk/js /usr/src/ion | ||
RUN apk add --no-cache --update nodejs npm \ | ||
&& mkdir -p /app/demo \ | ||
&& npm install \ | ||
&& cd demo \ | ||
&& npm install \ | ||
&& npm run build \ | ||
&& mv dist /app/demo \ | ||
&& rm -rf /usr/src/ion /root/.npm /tmp/* \ | ||
&& apk del --no-cache nodejs npm | ||
|
||
ENV ENABLE_TELEMETRY="false" | ||
RUN curl https://getcaddy.com | bash -s personal | ||
RUN apk add --no-cache --update curl bash \ | ||
&& curl https://getcaddy.com | bash -s personal \ | ||
&& apk del --no-cache curl bash | ||
|
||
ENTRYPOINT ["/usr/local/bin/caddy"] | ||
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout", "--agree=true"] |