Sign inSign up

apemill/tauri

By apemill

Updated 8 months ago

An image to compile Tauri application (www.tauri.app)

Image
0

1.1K

apemill/tauri repository overview

Description

This image was created to compile your docker application for windows, mainly using CI/CD

  • Each image has Node LTS (18), Chocolatey, and Yarn installed
  • Tauri dependencies are already downloaded in the image to speed up compilation
  • The compilation of all dependencies is still necessary for every run, we recommend caching the build directory
  • The working directory where you should put your project is C://work, but any folder should work in theory if you run the build function manually
  • For the MSVC image, the compiled directory target was moved from your source folder to C://target due to Docker for windows issues

Images

  • Images for Linux will come soon
tagRust versionPre-cached Tauri versionWindows versionDockerfile
1.2, msvc-1.2, latest1.65 - MSVC1.2ltsc2019Dockerfile
gnu1.65 - GNU1.2ltsc2019Dockerfile

Examples / Tutorials

docker run --storage-opt size=30G -v c:/your/project/folder:c:/work apemill/tauri
# with relatif repository
docker run --storage-opt size=30G -v ${pwd}:c:/work apemill/tauri

This would use your project folder and run yarn then yarn tauri build, you can then get your result in c://target

GitLab CI/CD example

  • You should create a Windows-docker executor runner for Gitlab for this to work, you could use the free Gitlab for Windows runner, but they do not come with docker exectutor, see bellow
windows-build:
  stage: build
  only:
    - main
  image: apemill/tauri:latest
  # Be sure to select worker with `executor = "docker-windows"`
  tags:
    - windows
    - docker
  script:
    - yarn
    - yarn tauri build
    # Rename output XXX.msi -> YourSoftware-$TAG.msi, and move it to local folder `bundle\windows`
    # > In this example, $TAG was created in a previous job to set the version of the software
    - $Env:FILE_NAME=$(Get-ChildItem c:\target\release\bundle\msi\*.msi | Select-Object -ExpandProperty Name)
    - New-Item ".\bundle\windows" -itemType Directory
    - Move-Item -Path "c:\target\release\bundle\msi\$Env:FILE_NAME" -Destination ".\bundle\windows\YourSoftware-$TAG.msi"
  cache:
    key: shared-cache
    paths:
        - c:\target\
  artifacts:
    paths:
      - .\bundle\windows\YourSoftware-$TAG.msi
    expire_in: 1 week
  • For the free Gitlab runner (this is not tested, it's just to put you in the right direction)
build-app:
  tags: 
    - windows
  stage: build
  script:
    - "docker pull apemill/tauri"
    - "docker run --storage-opt size=30G -v ${pwd}:c:/work apemill/tauri"

In this case, it is probably better to use a script to run your command inside the docker and give this script to "docker run". For example, to move your artifact after compilation in a folder the user can access.

Other images

Credit / Author

Images created by Apemill contact us if you find a bug or need an update. We do not guarantee the support of the images but we will do our best.

Tag summary

Content type

Image

Digest

sha256:a4eb07a33

Size

5.4 GB

Last updated

8 months ago

docker pull apemill/tauri