Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish an official Docker image #176

Closed
abrown opened this issue Mar 19, 2021 · 7 comments · Fixed by #271
Closed

Publish an official Docker image #176

abrown opened this issue Mar 19, 2021 · 7 comments · Fixed by #271

Comments

@abrown
Copy link
Collaborator

abrown commented Mar 19, 2021

It would be nice to have an official wasi-sdk Docker image for use in CI; the current images I see on Docker Hub are unofficial.

@abrown
Copy link
Collaborator Author

abrown commented Mar 19, 2021

See bytecodealliance/sightglass#104 for alternatives to this (e.g. multi-stage builds).

@pchickey
Copy link
Collaborator

pchickey commented Mar 19, 2021

The official docker image could be as simple as an ubuntu base and installing the deb, right?

I don't use docker hub so I don't know how to publish things there, or how users use them.

@abrown
Copy link
Collaborator Author

abrown commented Mar 19, 2021

Yeah, exactly. And maybe setting some environment variables. Possibly:

FROM ubuntu:18.04
WORKDIR /
RUN apt update && apt install -y wget
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
RUN tar xvf wasi-sdk-12.0-linux.tar.gz
ENV CC=/wasi-sdk-12.0/bin/clang
ENV CXX=/wasi-sdk-12.0/bin/clang++
ENV LD=/wasi-sdk-12.0/bin/lld
ENV CFLAGS=--sysroot=/wasi-sdk-12.0/share/wasi-sysroot
ENV CXXFLAGS=--sysroot=/wasi-sdk-12.0/share/wasi-sysroot
ENV PATH /wasi-sdk-12.0

@abrown
Copy link
Collaborator Author

abrown commented Mar 19, 2021

I think we would want to wire it up with the CI somehow so that, upon release, some docker push ... command is run.

@pchickey
Copy link
Collaborator

Currently CI doesn't do any publishing of artifacts, it just create some tarballs that the person on release duties (typically me?) downloads locally and uploads to the github release page. This is mostly out of laziness - I havent had time to do the programming in yaml or however you do these things in github CI/Actions, and figuring out how credentials are managed.

First step would be to add that Dockerfile and a shell script containing the commands to build and docker push ... in the tarball. But if you'd like to volunteer for automating publishing of any of the artifacts, it would save some toil!

@abrown
Copy link
Collaborator Author

abrown commented Apr 13, 2021

Ok, I think I understand from the docs how to do this and am trying to figure out if the owner of the webassembly name on DockerHub will share it with this project so we can publish it to webassembly/wasi-sdk (which sounds official). We'll need credentials to publish with, though: any thoughts on who should own those?

@thewtex
Copy link
Contributor

thewtex commented Nov 26, 2021

In case it is useful, we have a dockcross web-wasi image. This has CC, CXX, etc. set, but also enables source code and build artifacts outside of the image, CMake cross-compilation toolchain setup, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants