Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #86 from pion/issue-79
Browse files Browse the repository at this point in the history
Reduce ion-web size
  • Loading branch information
adwpc committed Mar 28, 2020
2 parents 3ad32c4 + 0f90d8c commit 171eacd
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions docker/web.Dockerfile
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"]

0 comments on commit 171eacd

Please sign in to comment.