| 1 |
|
| 2 |
This directory contains files & instructions to create a 'dasm build machine' |
| 3 |
Docker image that can build platform-specific dasm binaries for all three |
| 4 |
supported OSs (Linux, Windows and macOS) in a single go! |
| 5 |
|
| 6 |
Steps to create the Docker image: |
| 7 |
|
| 8 |
0. Make sure you have Docker Desktop installed on your machine |
| 9 |
1. Open a command prompt (Windows) or a bash shell (Linux/macOS) into this |
| 10 |
folder (i.e. containing the Dockerfile) |
| 11 |
2. Run the command: `docker build -t dasm:build .` |
| 12 |
Note: this will download/install all build tools so takes a while. |
| 13 |
|
| 14 |
Steps to run the Docker container and build dasm for all 3 platforms: |
| 15 |
|
| 16 |
1. Now run the container: `docker run -it --rm dasm:build`, which opens a shell |
| 17 |
to the container. |
| 18 |
Note: unless you want fetch a clone the dasm git repo and build that, it is |
| 19 |
probably easier to mount a shared drive in your docker container. |
| 20 |
On Windows, you can mount your c: drive on /mnt/c by running |
| 21 |
`docker run -it --rm -v c:\:/mnt/c dasm:build` (*) |
| 22 |
(*) This requires drive-sharing enabled in Docker Desktop, and sometimes |
| 23 |
needs this powershell command to allow that: |
| 24 |
`Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private` |
| 25 |
2. From the container shell, cd into a shared drive that contains a local git |
| 26 |
clone of the dasm repo. Or do a 'git clone' on the container itself, e.g. |
| 27 |
`git clone --single-branch --branch master https://github.com/dasm-assembler/dasm.git` |
| 28 |
3. cd into the dasm/docker folder from within the container shell |
| 29 |
4. Run: `./make_dasm_all_platforms.sh` |
| 30 |
5. This will sequentally call 'make' for all target platforms and copies the |
| 31 |
different dasm binaries into the /bin directory. |