-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_docker.html
40 lines (30 loc) · 9.12 KB
/
install_docker.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>Build Using Docker - Open Anne Pro</title> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="/assets/css/just-the-docs-default.css"> <script type="text/javascript" src="/assets/js/vendor/lunr.min.js"></script> <script type="text/javascript" src="/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Begin Jekyll SEO tag v2.7.1 --> <title>Build Using Docker | Open Anne Pro</title> <meta name="generator" content="Jekyll v4.1.1" /> <meta property="og:title" content="Build Using Docker" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="Open Anne Pro Project Site" /> <meta property="og:description" content="Open Anne Pro Project Site" /> <link rel="canonical" href="https://openannepro.github.io/install_docker.html" /> <meta property="og:url" content="https://openannepro.github.io/install_docker.html" /> <meta property="og:site_name" content="Open Anne Pro" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="Build Using Docker" /> <script type="application/ld+json"> {"@type":"WebPage","url":"https://openannepro.github.io/install_docker.html","headline":"Build Using Docker","description":"Open Anne Pro Project Site","@context":"https://schema.org"}</script> <!-- End Jekyll SEO tag --> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-search" viewBox="0 0 24 24"> <title>Search</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"> <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-doc" viewBox="0 0 24 24"> <title>Document</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"> <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline> </svg> </symbol> </svg> <div class="side-bar"> <div class="site-header"> <a href="https://openannepro.github.io/" class="site-title lh-tight"> Open Anne Pro </a> <a href="#" id="menu-button" class="site-button"> <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg> </a> </div> <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav"> <ul class="nav-list"><li class="nav-list-item"><a href="https://openannepro.github.io/" class="nav-list-link">Home</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/ap2_revisions/" class="nav-list-link">HW Revision and Variations</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/install/" class="nav-list-link">How to Install</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/customization/" class="nav-list-link">Customization</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/faq/" class="nav-list-link">Frequently Asked Questions</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/about/" class="nav-list-link">About</a></li><li class="nav-list-item"><a href="https://openannepro.github.io/contributing/" class="nav-list-link">Contributing</a></li></ul> </nav> <footer class="site-footer"> This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </footer> </div> <div class="main" id="top"> <div id="main-header" class="main-header"> <div class="search"> <div class="search-input-wrap"> <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search Open Anne Pro" aria-label="Search Open Anne Pro" autocomplete="off"> <label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label> </div> <div id="search-results" class="search-results"></div> </div> </div> <div id="main-content-wrap" class="main-content-wrap"> <div id="main-content" class="main-content" role="main"> <h1 id="the-following-build-script-is-provided-by-zinosat-on-the-discord-server"> <a href="#the-following-build-script-is-provided-by-zinosat-on-the-discord-server" class="anchor-heading" aria-labelledby="the-following-build-script-is-provided-by-zinosat-on-the-discord-server"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The following build script is provided by <code class="language-plaintext highlighter-rouge">@zinosat</code> on the Discord Server </h1> <p>Save the following into a file named <code class="language-plaintext highlighter-rouge">Dockerfile</code></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
# docker build -t ap2 .
#
# docker run --privileged -h ap2 --rm -it -v ${PWD}:/host --user $(id -u) -w /home/dev ap2 bash
FROM debian:bullseye
MAINTAINER Davide Viti <zinosat@gmail.com>
RUN sed -i \
-e "s|deb.debian.org|debian.fastweb.it|g" \
/etc/apt/sources.list
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
build-essential ca-certificates less git sudo \
pkg-config libusb-1.0-0-dev cargo gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib
RUN adduser --disabled-password --gecos '' dev && \
adduser dev sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN cd /home/dev; sudo -H -u dev git clone https://github.com/OpenAnnePro/AnnePro2-Tools.git && \
cd AnnePro2-Tools && cargo build --release
RUN cd /home/dev; sudo -H -u dev git clone https://github.com/OpenAnnePro/qmk_firmware.git annepro-qmk --recursive --depth 1 && \
cd annepro-qmk && ./util/qmk_install.sh && make annepro2/c18
RUN cd /home/dev; sudo -H -u dev git clone https://github.com/OpenAnnePro/AnnePro2-Shine.git --recursive --depth 1 && \
cd AnnePro2-Shine && make C18
RUN cp /home/dev/AnnePro2-Tools/target/release/annepro2_tools /home/dev/
RUN cp /home/dev/annepro-qmk/.build/annepro2_c18_default.bin /home/dev/
RUN cp /home/dev/AnnePro2-Shine/build/C18/annepro2-shine-C18.bin /home/dev/
ENV TZ /usr/share/zoneinfo/Europe/Rome
</code></pre></div></div> <p>and run</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker build <span class="nt">-t</span> ap2 <span class="nb">.</span>
docker run <span class="nt">--privileged</span> <span class="nt">-h</span> ap2 <span class="nt">--rm</span> <span class="nt">-it</span> <span class="nt">-v</span> <span class="k">${</span><span class="nv">PWD</span><span class="k">}</span>:/host <span class="nt">--user</span> <span class="si">$(</span><span class="nb">id</span> <span class="nt">-u</span><span class="si">)</span> <span class="nt">-w</span> /home/dev ap2 bash
</code></pre></div></div> <p>If you run Linux system it is possible to copy firmware and annepro2_tools binary from the container to the host with this command:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run <span class="nt">--rm</span> <span class="nt">-it</span> <span class="nt">--user</span> <span class="si">$(</span><span class="nb">id</span> <span class="nt">-u</span><span class="si">)</span> <span class="nt">-v</span> <span class="k">${</span><span class="nv">PWD</span><span class="k">}</span>:/host ap2 bash <span class="nt">-c</span> <span class="s1">'cp /home/dev/annepro2* /host'</span>
</code></pre></div></div> <p>After that you can continue on flashing the firmware from the host system.</p> </div> </div> <div class="search-overlay"></div> </div> </body> </html>