compressO / Dockerfile
aripbae's picture
Update Dockerfile
efed5e1 verified
raw
history blame contribute delete
743 Bytes
FROM node:24-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git \
curl \
build-essential \
pkg-config \
libssl-dev \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.cargo/bin:${PATH}"
RUN npm i -g pnpm
WORKDIR /app
RUN chmod -R 777 /app
RUN git clone https://github.com/codeforreal1/compressO.git .
RUN sed -i 's/defineConfig(({ mode }) => ({/defineConfig(({ mode }) => ({ server: { allowedHosts: true }, preview: { allowedHosts: true },/g' vite.config.ts
RUN pnpm install --ignore-scripts
RUN pnpm vite:build
EXPOSE 7860
CMD ["pnpm", "vite", "preview", "--port", "7860", "--host", "0.0.0.0"]