Skip to content

Instantly share code, notes, and snippets.

@nodakai
Created May 23, 2020 20:11
Show Gist options
  • Save nodakai/bc0c80381cd0b787d8a5c65a1771ef5f to your computer and use it in GitHub Desktop.
Save nodakai/bc0c80381cd0b787d8a5c65a1771ef5f to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
set -x
docker build -t deno-cent7 .
FROM centos:7
RUN yum upgrade -y \
&& yum install -y git gcc \
&& yum clean packages
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y
WORKDIR /tmp
CMD git clone --recurse-submodules https://github.com/denoland/deno.git \
&& cd deno \
&& . ~/.cargo/env \
&& cargo build --release \
&& mv target/release/deno /output
#!/usr/bin/env bash
set -eu
set -x
docker rm deno-cent7-0 || true
docker run -v "$(pwd)":/output --name deno-cent7-0 deno-cent7
@recursionbane
Copy link

recursionbane commented Jan 16, 2021

As of 2021/01/15, I get:

Cloning into 'deno'...
Submodule 'std/wasi/testdata' (https://github.com/khronosproject/wasi-test-suite.git) registered for path 'std/wasi/testdata'
Submodule 'test_util/wpt' (https://github.com/web-platform-tests/wpt.git) registered for path 'test_util/wpt'
Submodule 'deno_third_party' (https://github.com/denoland/deno_third_party.git) registered for path 'third_party'
Cloning into 'std/wasi/testdata'...
Submodule path 'std/wasi/testdata': checked out 'afe1b368d229016794be458b27be39f052e74942'
Cloning into 'test_util/wpt'...
fatal: reference is not a tree: a51d36327febebc8634d7b523a7e620f4ebdbf26
Cloning into 'third_party'...
Submodule path 'third_party': checked out '586fb6a2c7384e27fd623d3cb140944563a39662'
Unable to checkout 'a51d36327febebc8634d7b523a7e620f4ebdbf26' in submodule path 'test_util/wpt'

I removed --recurse-submodules from the Dockerfile to get it going.

Also not that you have to rename deno-on-cent7.Dockerfile to Dockerfile before you run build-deno-on-cent7.bash

Thanks for this gist!

@nodakai
Copy link
Author

nodakai commented Mar 20, 2022

Memo: FROM registry.access.redhat.com/ubi7 also looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment