From dfc9186cc7b36e6743b0e6139d11777be3c6c3c6 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Wed, 7 Jun 2023 17:17:50 +0200 Subject: [PATCH] Introduce THELOUNGE_REPOSITORY to specify upstream repository to compile from --- Dockerfile | 9 +++++++-- docker-compose.yml | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd16e9e..9434bcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM node:lts-alpine +ARG THELOUNGE_REPOSITORY=git+https://github.com/thelounge/thelounge.git ARG THELOUNGE_VERSION=4.4.1-rc.2 LABEL org.opencontainers.image.title "Official The Lounge image" @@ -20,14 +21,18 @@ ENV PORT 9000 EXPOSE ${PORT} ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["thelounge", "start"] +WORKDIR /src/thelounge +CMD ["yarn", "start"] COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh # Install thelounge. RUN apk --update --no-cache --virtual build-deps add python3 build-base git && \ ln -sf python3 /usr/bin/python && \ - yarn --non-interactive --frozen-lockfile global add thelounge@${THELOUNGE_VERSION} && \ + git clone "${THELOUNGE_REPOSITORY}" /src/thelounge && \ + cd /src/thelounge && git reset --hard "${THELOUNGE_VERSION}" && \ + yarn --non-interactive --frozen-lockfile install --production=false && \ + yarn --non-interactive build && \ yarn --non-interactive cache clean && \ apk del --purge build-deps && \ rm -rf /root/.cache /tmp /usr/bin/python diff --git a/docker-compose.yml b/docker-compose.yml index 1b82c88..f5bade3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,8 @@ version: '2' services: thelounge: - image: ghcr.io/thelounge/thelounge:latest + build: + context: ./ container_name: thelounge ports: - "9000:9000"