forked from Kong/ngx_wasm_module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.amd64.centos7
39 lines (35 loc) · 1.41 KB
/
Dockerfile.amd64.centos7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Use Python 3.8+ (required by V8's GN build system)
# See https://hub.docker.com/r/centos/python-38-centos7
FROM centos/python-38-centos7
COPY . /ngx_wasm_module
USER root
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*.repo && \
yum-config-manager --disable centos-sclo-sclo && \
yum update -y && \
yum install -y epel-release && \
yum install -y centos-release-scl && \
yum install -y \
devtoolset-11 \
devtoolset-11-gcc-c++ \
devtoolset-11-libatomic-devel \
ninja-build \
clang \
cmake3 \
make \
gcc \
git \
glib2-devel \
perl \
perl-IPC-Cmd \
perl-Test-Simple
RUN ln -nfs $(which cmake3) /usr/bin/cmake
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo
ENV PATH $CARGO_HOME/bin:$PATH
RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable && \
chmod -R a=rwX $CARGO_HOME $RUSTUP_HOME
# bypass "multiple definitions of 'assertions'" linker error from wasm.h:
# https://github.com/WebAssembly/wasm-c-api/blob/master/include/wasm.h#L29
# and ensure a more recent libstdc++ is found
ENV LD_FLAGS="-Wl,--allow-multiple-definition -L/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8"