-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4eeab9
commit 9f972a1
Showing
3 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,51 @@ | ||
# This Dockerfile pulls the latest build of the OpenBullet2 project from | ||
# the latest release on GitHub and wraps it in a Docker container. | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install dependencies | ||
RUN apt-get update -yq && apt-get install -y --no-install-recommends apt-utils | ||
RUN apt-get upgrade -yq && apt-get install -yq apt-utils curl git nano wget unzip python3 python3-pip | ||
|
||
# Setup nodejs | ||
RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - && apt-get install -yq nodejs build-essential | ||
RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list.d/debian.list | ||
|
||
# Install chromium and firefox for selenium and puppeteer | ||
RUN apt-get update -yq && apt-get install -y --no-install-recommends firefox chromium | ||
RUN pip3 install webdrivermanager || true | ||
RUN webdrivermanager firefox chrome --linkpath /usr/local/bin || true | ||
|
||
# Install basic dependencies | ||
RUN apt-get update -yq \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
curl \ | ||
git \ | ||
nano \ | ||
wget \ | ||
unzip \ | ||
python3 \ | ||
python3-pip \ | ||
gnupg \ | ||
lsb-release \ | ||
software-properties-common | ||
|
||
# Setup Node.js (LTS Version) | ||
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - \ | ||
&& apt-get install -yq nodejs build-essential | ||
|
||
# Add Mozilla Team PPA for the latest Firefox | ||
RUN echo "deb http://ppa.launchpad.net/mozillateam/ppa/ubuntu focal main" | tee /etc/apt/sources.list.d/mozillateam-ppa.list \ | ||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F \ | ||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9BDB3D89CE49EC21 \ | ||
&& apt-get update -yq | ||
|
||
# Install the latest Firefox and Chromium | ||
RUN apt-get install -y --no-install-recommends \ | ||
firefox \ | ||
chromium | ||
|
||
# Install WebDriverManager | ||
RUN pip3 install webdrivermanager || true \ | ||
&& webdrivermanager firefox chrome --linkpath /usr/local/bin || true | ||
|
||
# Clean up | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
# Get OpenBullet2.Web from the latest release on GitHub | ||
RUN wget https://github.com/openbullet/openbullet2/releases/latest/download/OpenBullet2.Web.zip | ||
RUN unzip OpenBullet2.Web.zip | ||
RUN rm OpenBullet2.Web.zip | ||
# Download and unpack the latest OpenBullet2.Web release | ||
RUN wget https://github.com/openbullet/openbullet2/releases/latest/download/OpenBullet2.Web.zip \ | ||
&& unzip OpenBullet2.Web.zip \ | ||
&& rm OpenBullet2.Web.zip | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["dotnet", "./OpenBullet2.Web.dll", "--urls=http://*:5000"] |