# Use Ubuntu as a parent image | |
FROM ubuntu:latest | |
# Set environment variables for non-interactive installation | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install necessary packages | |
RUN apt-get update && \ | |
apt-get install -y nodejs npm git && \ | |
apt-get clean | |
# Create /downloads directory and set permissions | |
RUN mkdir -p /downloads && chmod 777 /downloads | |
# Set environment variables for the user | |
# Set the working directory | |
WORKDIR /downloads | |
# Clone the Piped repository | |
RUN git clone https://github.com/TeamPiped/Piped-Docker.git . | |
# Change ownership to the new user | |
# Set up the environment variables | |
ENV NODE_ENV=production | |
# Install the dependencies | |
WORKDIR /downloads/Piped-Docker | |
RUN npm install | |
# Expose the port the app runs on | |
EXPOSE 8080 | |
# Command to run the application | |
CMD ["npm", "start"] | |