1
0
stack-orchestrator/app/data/container-build/cerc-react-peer/Dockerfile
Nabarun Gogoi b0aeff50bb Package mobymask-v2 stack web-apps similar to laconic-console app (#310)
* Build MobyMask web-app at container build step

* Fix web-app start script to use env variables in config

* Replace variables in built web-app files

* Use published mobymask-ui package from gitea

* Use published react-peer/test-app from gitea

* Remove local gitea publish TODO

Former-commit-id: cf79f0de0adccbd8812ed23a3d0a013cd5af7ff8
2023-04-18 18:25:58 +05:30

31 lines
846 B
Docker

FROM node:18.15.0-alpine3.16
# This container pulls npm package from a registry configured via env var
ARG CERC_NPM_REGISTRY_URL
RUN apk --update --no-cache add make git python3 jq bash
# We do this to get a yq binary from the published container, for the correct architecture we're building here
COPY --from=docker.io/mikefarah/yq:latest /usr/bin/yq /usr/local/bin/yq
RUN mkdir -p /scripts
COPY ./apply-webapp-config.sh /scripts
COPY ./start-serving-app.sh /scripts
# Configure the local npm registry
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL}
RUN mkdir -p /config
# Install simple web server for now (use nginx perhaps later)
RUN yarn global add http-server
# Globally install the payload web app package
RUN yarn global add @cerc-io/test-app
# Expose port for http
EXPOSE 80
CMD ["/scripts/start-serving-app.sh"]