-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2996 from chaoss/keyman-docker-hotfix
Fix key orchestrator missing in Docker build
- Loading branch information
Showing
3 changed files
with
82 additions
and
10 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
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="[email protected]" | ||
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 | ||
|
||
|
@@ -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.