alpine

Where to set system default environment variables in Alpine linux?

让人想犯罪 __ 提交于 2020-05-09 20:51:07
问题 I know, with Ubuntu, you can set default values for environment variables in /etc/environment ; I do not see that file in Alpine linux. Is there a different location for setting system-wide defaults? 回答1: It seems that /etc/profile is the best place I could find. At least, some environment variables are set there: export CHARSET=UTF-8 export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export PAGER=less export PS1='\h:\w\$ ' umask 022 for script in /etc/profile.d/*.sh ;

How to build a go executable that doesn't link to musl libc

我的未来我决定 提交于 2020-04-17 07:49:39
问题 So: The official Go build container is based on Alpine. Alpine uses musl as libc instead of glibc. I need to build a Go executable in a container that can be run on Ubuntu, which uses glibc. How do I either Make the official GoLang build container use glibc or Build my GoLang project on an Ubuntu based container I can't use the Disable CGO solution, as my Go code is a FUSE driver, which requires CGO 来源: https://stackoverflow.com/questions/54524785/how-to-build-a-go-executable-that-doesnt-link

How to build a go executable that doesn't link to musl libc

霸气de小男生 提交于 2020-04-17 07:46:33
问题 So: The official Go build container is based on Alpine. Alpine uses musl as libc instead of glibc. I need to build a Go executable in a container that can be run on Ubuntu, which uses glibc. How do I either Make the official GoLang build container use glibc or Build my GoLang project on an Ubuntu based container I can't use the Disable CGO solution, as my Go code is a FUSE driver, which requires CGO 来源: https://stackoverflow.com/questions/54524785/how-to-build-a-go-executable-that-doesnt-link

How to disable core file dumps in docker container

ε祈祈猫儿з 提交于 2020-03-18 10:47:09
问题 My PHP container runs puppeteer to generate PDF. By generating a PDF document, it also creates two core dump files inside my container. I am not sure where they actually come from. The host/server is CentOS 7. I've checked following: No application error log, Browsershot/puppeteer is running without errors. No error log (e.g. segfault) found in /var/log/messages I've tried to disable core dumps By following Disable core dumps section of https://linux-audit.com/understand-and-configure-core

Alpine Dockerfile Advantages of --no-cache Vs. rm /var/cache/apk/*

混江龙づ霸主 提交于 2020-03-17 04:19:50
问题 When creating Dockerfiles using the Alpine image, I have often seen the use of the apk --no-cache and other times it is committed and instead I see rm /var/cache/apk/* . I am curious to know making use of the --no-cache eliminates the need to later do a rm /var/cache/apk/* . I would also like to know if one style is favored over another. 回答1: The --no-cache option allows to not cache the index locally, which is useful for keeping containers small. Literally it equals apk update in the

Alpine Dockerfile Advantages of --no-cache Vs. rm /var/cache/apk/*

孤人 提交于 2020-03-17 04:18:06
问题 When creating Dockerfiles using the Alpine image, I have often seen the use of the apk --no-cache and other times it is committed and instead I see rm /var/cache/apk/* . I am curious to know making use of the --no-cache eliminates the need to later do a rm /var/cache/apk/* . I would also like to know if one style is favored over another. 回答1: The --no-cache option allows to not cache the index locally, which is useful for keeping containers small. Literally it equals apk update in the

docker alpine /bin/sh script.sh not found

瘦欲@ 提交于 2020-02-23 08:45:06
问题 I'm trying to build a docker image that has the openjdk:8-alpine as base. The problem is when I try to execute a script.sh , returning me the following message: /bin/sh: bin/script.sh: not found The script.sh is in the bin/ folder correctly, that's why I don't know what's the problem. Anyone have any idea? Thank you. 回答1: Make sure the shebang on the script points to an interpreter that actually exists. Thus, if the script being invoked uses: #!/bin/bash ...then /bin/bash needs to actually be

Package missing in Alpine Linux even though it's listed on package repo website [closed]

时光怂恿深爱的人放手 提交于 2020-02-03 04:34:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I am attempting to build out a Docker container that runs Alpine Linux with GDAL and the necessary Python hooks: FROM python:3.6-alpine RUN apk update RUN apk add py-gdal gdal RUN pip install uwsgi RUN mkdir /code WORKDIR /code COPY requirements.txt . RUN pip install -r requirements.txt COPY . . CMD ["uwsgi",

ERROR: unsatisfiable constraints using apk in dockerfile

痴心易碎 提交于 2020-01-31 06:29:13
问题 I'm trying to install postgis into a postgres container. Dockerfile: FROM postgres:9.6.4-alpine RUN apk update \ && apk add -u postgresql-9.6-postgis-2.4 postgresql-9.6-postgis-2.4-scripts \ && rm -rf /var/lib/apt/lists/* COPY ./scripts/postgis.sh /docker-entrypoint-initdb.d/postgis.sh postgis.sh: #!/bin/sh for DB in $(psql -t -c "SELECT datname from pg_database where datname = 'backend'"); do echo "Loading PostGIS extensions into $DB" "${psql[@]}" --dbname="$DB" <<-'EOSQL' CREATE EXTENSION

ERROR: unsatisfiable constraints using apk in dockerfile

…衆ロ難τιáo~ 提交于 2020-01-31 06:25:45
问题 I'm trying to install postgis into a postgres container. Dockerfile: FROM postgres:9.6.4-alpine RUN apk update \ && apk add -u postgresql-9.6-postgis-2.4 postgresql-9.6-postgis-2.4-scripts \ && rm -rf /var/lib/apt/lists/* COPY ./scripts/postgis.sh /docker-entrypoint-initdb.d/postgis.sh postgis.sh: #!/bin/sh for DB in $(psql -t -c "SELECT datname from pg_database where datname = 'backend'"); do echo "Loading PostGIS extensions into $DB" "${psql[@]}" --dbname="$DB" <<-'EOSQL' CREATE EXTENSION