As a continuation from: https://github.com/emscripten-core/emscripten/issues/8742 This PR provides adopted Dockerfile from https://github.com/trzecieu/emscripten-docker/blob/master/docker/trzeci/emscripten-fastcomp/Dockerfile which supports builds: * fastcomp * upstream Features: * An image can be build with fastcomp and upstream version of Emscripten SDK * It applies some extra size optimizations (that might be removed in sake of clarity / stability) * It creates conventional `1000:1000` user `emscripten` * It creates extra entrypoint that mitigates running as non-root user (Some context: https://trzeci.eu/fixing-permission-of-files-created-from-docker/) * It has simple-stupid tests performed during building
22 lines
584 B
Makefile
22 lines
584 B
Makefile
#!/usr/bin/env make
|
|
|
|
# Emscripten version to build: Should match the version that has been already released.
|
|
# i.e.: 1.38.45, 1.38.45-upstream
|
|
version =
|
|
alias =
|
|
|
|
.TEST:
|
|
ifndef version
|
|
$(error argument 'version' is not set. Please call `make version=SOME_VERSION ...`)
|
|
endif
|
|
|
|
build: .TEST
|
|
docker build --build-arg=EMSCRIPTEN_VERSION=${version} --tag emscripten/emscripten:${version} .
|
|
|
|
push: .TEST
|
|
docker push emscripten/emscripten:${version}
|
|
ifdef alias
|
|
docker tag emscripten/emscripten:${version} emscripten/emscripten:${alias}
|
|
docker push emscripten/emscripten:${alias}
|
|
endif
|