Skip to content

Commit

Permalink
[build-docker] Fixed arm32 build
Browse files Browse the repository at this point in the history
  • Loading branch information
openbullet committed Jul 11, 2024
1 parent b4eeab9 commit 9f972a1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
with:
push: true
file: ./Dockerfile.remote
platforms: linux/arm64/v8,linux/amd64
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: openbullet/openbullet2:latest,openbullet/openbullet2:${{ env.VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ jobs:
with:
push: true
file: ./Dockerfile.remote
platforms: linux/arm64/v8,linux/amd64
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: openbullet/openbullet2:latest,openbullet/openbullet2:${{ env.VERSION }}
60 changes: 40 additions & 20 deletions Dockerfile.remote
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"]

0 comments on commit 9f972a1

Please sign in to comment.