Skip to content

Commit

Permalink
Merge pull request #2996 from chaoss/keyman-docker-hotfix
Browse files Browse the repository at this point in the history
Fix key orchestrator missing in Docker build
  • Loading branch information
sgoggins authored Feb 14, 2025
2 parents 9500e73 + 1393440 commit c6c86ed
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 10 deletions.
1 change: 1 addition & 0 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ COPY ./augur/ augur/
COPY ./metadata.py .
COPY ./setup.py .
COPY ./scripts/ scripts/
COPY ./keyman/ keyman/

# Add rust and cargo to PATH
ENV PATH="/usr/bin/:/root/.cargo/bin:/usr/local/bin:${PATH}"
Expand Down
91 changes: 81 additions & 10 deletions docker/backend/graphical
Original file line number Diff line number Diff line change
@@ -1,22 +1,75 @@
#SPDX-License-Identifier: MIT
FROM python:3.9-slim-bullseye
# SPDX-License-Identifier: MIT
FROM python:3.11-slim-bullseye

LABEL maintainer="outdoors@acm.org"
LABEL version="0.51.1"
LABEL version="0.76.6"

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}"

RUN set -x \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
&& apt-get -y install \
git \
bash \
curl \
gcc \
python3-pip \
software-properties-common \
postgresql-contrib \
musl-dev \
python3-dev \
python3-distutils \
python3-venv \
wget \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
libpq-dev \
build-essential \
rustc \
cargo \
chromium \
tar \
jq \
chromium-driver \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

# Install Firefox from Debian repositories for ARM64 architecture
RUN set -x \
&& apt-get update \
&& apt-get install -y firefox-esr

# Install Geckodriver
RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.tag_name' | sed 's/v//') \
&& ARCH=$(uname -m) \
&& if [ "$ARCH" = "aarch64" ]; then \
GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \
GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \
else \
GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \
GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \
fi \
&& wget $GECKODRIVER_URL \
&& tar -xzf $GECKODRIVER_FILE \
&& mv geckodriver /usr/local/bin/ \
&& rm $GECKODRIVER_FILE

# Verify installations
RUN firefox --version
RUN geckodriver --version

# Ensure Rust directories are writable
RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \
chmod -R 777 /root/.rustup /root/.cargo

# Add rust and cargo to PATH
ENV PATH="/root/.cargo/bin:${PATH}"

# Install the specific version of Rust
RUN set -x \
&& rustup install 1.78.0
RUN set -x \
&& rustup default 1.78.0

EXPOSE 5000

Expand All @@ -27,20 +80,38 @@ COPY ./augur/ augur/
COPY ./metadata.py .
COPY ./setup.py .
COPY ./scripts/ scripts/
COPY ./keyman/ keyman/

# Add rust and cargo to PATH
ENV PATH="/usr/bin/:/root/.cargo/bin:/usr/local/bin:${PATH}"

#COPY ./docker/backend/docker.config.json .
RUN python3 -m venv /opt/venv

RUN set -x \
&& /opt/venv/bin/pip install --upgrade pip

RUN set -x \
&& /opt/venv/bin/pip install wheel

RUN set -x \
&& /opt/venv/bin/pip install .

RUN ./scripts/docker/install-workers-deps.sh
RUN set -x \
&& /opt/venv/bin/pip install --upgrade pip \
&& /opt/venv/bin/pip install wheel \
&& /opt/venv/bin/pip install .

RUN ./scripts/docker/install-go.sh
ENV PATH="${PATH}:/usr/local/go/bin"
RUN ./scripts/docker/install-workers-deps.sh

# RUN ./scripts/install/workers.sh

RUN mkdir -p repos/ logs/ /augur/facade/

COPY ./docker/backend/graphical.sh /
RUN chmod +x /graphical.sh
ENTRYPOINT /graphical.sh
COPY ./docker/backend/init.sh /
RUN chmod +x /entrypoint.sh /init.sh
ENTRYPOINT ["/bin/bash", "/graphical.sh"]
#ENTRYPOINT ["/entrypoint.sh"]
CMD /init.sh
Empty file added keyman/__init__.py
Empty file.

0 comments on commit c6c86ed

Please sign in to comment.