Skip to content

Commit

Permalink
[build-docker] Fixed docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
openbullet committed Jul 11, 2024
1 parent 3cef80b commit 0cd646f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 62 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/arm64/v8,linux/amd64
file: ./Dockerfile.remote
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: openbullet/openbullet2:latest,openbullet/openbullet2:${{ env.VERSION }}
1 change: 1 addition & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
file: ./Dockerfile.remote
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: openbullet/openbullet2:latest,openbullet/openbullet2:${{ env.VERSION }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This Dockerfile is meant to be run locally to build the OpenBullet2 project
# for normal usage via docker.

# -------
# BACKEND
# -------
Expand Down Expand Up @@ -62,8 +65,5 @@ RUN webdrivermanager firefox chrome --linkpath /usr/local/bin || true

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /app

EXPOSE 5000
CMD ["dotnet", "./OpenBullet2.Web.dll", "--urls=http://*:5000"]

2 changes: 2 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This Dockerfile is meant to be run in a CI/CD pipeline to build the OpenBullet2 project.

# -------
# BACKEND
# -------
Expand Down
31 changes: 31 additions & 0 deletions Dockerfile.remote
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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

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

EXPOSE 5000
CMD ["dotnet", "./OpenBullet2.Web.dll", "--urls=http://*:5000"]
58 changes: 0 additions & 58 deletions OpenBullet2.Web/Dockerfile

This file was deleted.

0 comments on commit 0cd646f

Please sign in to comment.