This is a Node.js base image for Cloudy
First, create a project:
main.ts
:
import { createApp } from "vue";
import App from "./App.vue";
createApp(App).mount("#app");
index.html
<div id="app"></div>
<script type="module" src="src/main.ts"></script>
App.vue
<template>
<div>Hello, {{ name }}!</div>
</template>
<script setup>
const name = 'world';
</script>
Then run a build
docker run --rm -v $PWD:/home/app ghcr.io/cloud-cli/vite:latest build
After build, create a Dockerfile
FROM ghcr.io/cloud-cli/node:latest
ADD . /home/app
Then build the image:
docker build -t my-app .
The app is now ready to run or publish!
docker run --rm -p 80:8080 -e PORT=8080 -v $PWD:/home/app ghcr.io/cloud-cli/vite:latest preview