background
An error is reported when an executable file packaged by a project is executed in the alpine container
Solution:
It is judged that the lack of dependent environment leads to the unrecognization of this executable file. Install glibc to solve the problem
You can also directly change the from image to busybox: glibc
cat Dockerfile
FROM alpine:3.14
COPY xxx /tmp/
ARG TZ="Asia/Shanghai"
ENV TZ ${TZ}
RUN mkdir -p /opt/xxx && mv /tmp/xxx /tmp/ysera_mgtv.conf /opt/xxx && \
chmod 777 /opt/xxx/xxx && \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk add tzdata && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk && \
apk add glibc-2.29-r0.apk
USER root
CMD ["/opt/xxx/xxx"]
Similar Posts:
- Centos6 upgrades glibc-2.17 to solve requirements: libc. So. 6 (glibc)_ 2.14) (64bit) error resolution
- linux:/lib/libc.so.6: version `glibc_2.7′ not foun
- CentOS6 /lib64/libc.so.6: version `GLIBC’2.14′ not found
- ImportError: /lib64/libc.so.6: version `GLIBC_2.17′ problem solved
- /lib64/libc.so.6: version `GLIBC_2.14′ not found [How to Solve]
- Swoole Extension Install Error: configure: error: C preprocessor “/lib/cpp” fails sanity check
- Configure: error: no acceptable C compiler found in $PATH [How to Solve]
- [Solved] Error in installing RPM package in CentOS – no key
- GCC refers to math. H header file, and there are some errors such as undefined reference to ` POW ‘when compiling
- How to Solve Yum Install Development Tools Error