Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
webysther authored Jul 17, 2023
1 parent 2100008 commit 6315e90
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# syntax=docker/dockerfile:1

FROM lsiobase/ubuntu:jammy

ARG HOPPSCOTH_RELEASE
ARG HOPPSCOTH_REPO="hoppscotch/hoppscotch"
LABEL build_version="Based on Linuxserver.io images version:- ${HOPPSCOTH_RELEASE}"
LABEL maintainer="Hoppscotch"

ARG DEBIAN_FRONTEND="noninteractive"

ENV NODE_VERSION=18.16.0
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
ENV NVM_DIR=/root/.nvm

RUN echo "**** install node family ****" && \
apt update && apt install -y debian-keyring debian-archive-keyring apt-transport-https pwgen python3-pip && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash && \
. "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} && \
nvm use v${NODE_VERSION} && nvm alias default v${NODE_VERSION} && \
npm install -g npm pnpm && node --version && npm --version && pnpm --version && \
echo "**** install caddy ****" && \
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | \
gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && \
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | \
tee /etc/apt/sources.list.d/caddy-stable.list && \
apt update && \
apt install -y caddy && \
caddy version && \
echo "**** install hoppscoth ****" && \
mkdir -p \
/app/ && \
if [ -z ${HOPPSCOTH_RELEASE+x} ]; then \
HOPPSCOTH_RELEASE=$(curl -sX GET "https://api.github.com/repos/${HOPPSCOTH_REPO}/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p /app && \
echo $HOPPSCOTH_RELEASE && \
curl -o \
/tmp/hoppscotch.tar.gz -L \
"https://github.com/${HOPPSCOTH_REPO}/archive/${HOPPSCOTH_RELEASE}.tar.gz" && \
tar xf \
/tmp/hoppscotch.tar.gz -C \
/app/ --strip-components=1 && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

WORKDIR /app

RUN echo "**** install app ****" && \
cp .env.example .env && \
pnpm install

COPY .docker/ /

EXPOSE 80
VOLUME /config

0 comments on commit 6315e90

Please sign in to comment.