From 6638580fefc4bf488400dc1b4e8a90c5321f0447 Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 21 Nov 2023 18:26:54 -0500 Subject: [PATCH] Add Dockerfile --- .dockerignore | 8 ++++++++ Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..1c1d1499 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.yarn +.pnp* +.git +.gitignore +node_modules +invidious-source +json.sqlite +*.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c934dca0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +## To build the image, run: +## docker build -t poketube . + +## To run the image, run: +## docker run -d -p 6003:6003 poketube + +# Base (Debian) +FROM debian + +# Set Work Directory +WORKDIR /poketube +COPY . /poketube + +# Expose Ports +EXPOSE 6003 + +# Install Requirements +RUN apt-get update && apt-get -y install \ + libcurl4-openssl-dev make g++ ca-certificates curl gnupg + +# Install NodeJS v18 +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + +RUN apt-get update +RUN apt-get -y install nodejs + +# Install Packages +RUN npm install + +# Run +CMD npm start \ No newline at end of file