RELEASE switchdev - Docker image to easily compile homebrew applications for the Nintendo Switch

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by yesimnathan, May 21, 2018.

  1. yesimnathan
    OP

    yesimnathan Advanced Member

    Newcomer
    3
    May 11, 2018
    United States
    This is just a super simple Docker image that will allow you to easily compile a Nintendo Switch homebrew application without having to install a bunch of stuff & configure your local workstation for Switch homebrew.

    Assuming you have Docker setup on your workstation and a Makefile for your project, you can just run this command from within your homebrew project's root directory:
    Code:
    docker run --rm -v $PWD:/developer yesimnathan/switchdev
    I'm just getting into Switch homebrew but I've compiled some basic apps as well as Atmosphere with this and it seems to work great, so I figured I'd share it for others to use!

    Image on Docker Hub: https://hub.docker.com/r/yesimnathan/switchdev/
    Source: https://github.com/nchowning/dockerfiles/tree/master/switchdev
     
    Last edited by yesimnathan, May 21, 2018
  2. mattytrog

    mattytrog Not on my watch.

    Member
    10
    Apr 27, 2018
    United Kingdom
    First! Top banana young man. Will be trying this
     
    yesimnathan likes this.
  3. BurningDesire

    BurningDesire GBAtemp Guru

    Member
    13
    Jan 27, 2015
    United States
    Behind a screen reading news
    Sweet I recently been getting into docker! Very excited to try this out.
     
    yesimnathan likes this.
  4. yesimnathan
    OP

    yesimnathan Advanced Member

    Newcomer
    3
    May 11, 2018
    United States
    Thanks! If you can think of any improvements, let me know or submit a PR! I'd love to make this as useful as possible =)
     
  5. AileenLumina

    AileenLumina Python main, software engineer and API designer

    Member
    4
    Sep 27, 2015
    Germany
    I have shown your docker image to the devs of devkitA64 and libnx. Let me forward their response:

    <fincs>
    https://hub.docker.com/r/devkitpro/devkita64/
    <fincs> The Official™ Docker image for devkitA64 + libnx + switch portlibs
    <Aileen> That sounds like the switchdev docker image is redundant, lol
    <fincs> Totally
    <fincs> In fact I dare say the one you linked to should be *removed*
     
    Last edited by AileenLumina, May 22, 2018
    yesimnathan likes this.
  6. yesimnathan
    OP

    yesimnathan Advanced Member

    Newcomer
    3
    May 11, 2018
    United States
    I had no idea that official devkitpro docker images existed! Thanks for the info! Those are close to what I wanted so I have updated my image to use the devkitpro/devkita64 as a base.
     
    cjsimon, charlieb and AileenLumina like this.
  7. MurrayDB42

    MurrayDB42 Newbie

    Newcomer
    2
    Dec 14, 2014
    Canada
    Regardless of "redundancy", thanks for taking the time to do this and sharing any changes you've made.
     
  8. djricekcn

    djricekcn GBAtemp Maniac

    Member
    5
    May 29, 2009
    United States
    what does this do? a charging dock that sends payload when it's docked or something?

    **edit
    did go to the links, but don't understand squat so won't be touching it but still curious on what this is.
     
    Last edited by djricekcn, May 22, 2018
  9. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    It's to make homebrew from the source code, but instead of installing a hundred different things and hoping you installed the right kind of the one hundred different things, you just install docker and the docker image.

    — Posts automatically merged - Please don't double post! —

    Any docker for windows 10 home exists?
     
    yesimnathan likes this.
  10. lordelan

    lordelan GBAtemp Psycho!

    Member
    10
    Jan 4, 2015
    Germany
    Look what "Docker" is. You can think of it like some kind of VM that you control by terminal commands (although that's not anywhere near the truth lol).
     
  11. djricekcn

    djricekcn GBAtemp Maniac

    Member
    5
    May 29, 2009
    United States
    thanks for the information.
     
  12. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    Gonna install windows 10 pro trial on a VHD to install docker.
     
  13. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    Hey, it gives me an error.
    Code:
    docker: Error response from daemon: create $PWD: "$PWD" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
    See 'docker run --help'.
     
  14. Steckbecken

    Steckbecken Advanced Member

    Newcomer
    3
    Jan 12, 2018
    Austria
    Check the value of $PWD for illegal characters ;)
     
  15. yesimnathan
    OP

    yesimnathan Advanced Member

    Newcomer
    3
    May 11, 2018
    United States
    Hmmm I've not used docker on Windows but it's possible that the $PWD environment variable doesn't exist. Try changing '$PWD' to the full/absolute path to your project directory
     
  16. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    Tried that. Gives me a "makefile doesn't exist" error. Gonna install manjaro and try with that.
     
  17. Steckbecken

    Steckbecken Advanced Member

    Newcomer
    3
    Jan 12, 2018
    Austria
    Its a simple Path issue, nothing major. Whats the output of $PWD? Did you take care for / and \?

    Plus: does makefile really exist where you expect it?
     
    Last edited by Steckbecken, May 22, 2018
  18. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    I already said the output of $PWD. The thing is, $PWD isn't a thing in windows. So i specidified the directory instead, and that says that there is no make file. But there IS a makefile. in the root of the atmosphere source, cloned recoursively on the desktop using git, with fusee that has an appended #define I_KNOW_WHAT_I_AM_DOING in main.c! So that's why i am installing manjaro.
     
  19. Steckbecken

    Steckbecken Advanced Member

    Newcomer
    3
    Jan 12, 2018
    Austria
    Seems high effort for a simple path issue, but whatever pleases your needs
     
  20. Filo97

    Filo97 Zelda's totally my sister! Not lying!

    Member
    9
    Oct 8, 2015
    Italy
    Hyrule Castle
    On Manjaro: docker: Error response from daemon: error creating aufs mount to /var/lib/docker/aufs/mnt/9aaa832df8bae150693cda2333b72848087660d4642279d639edacb1e36b7bf9-init: invalid argument.
     
Loading...