Skip to content

Commit c0f6c2d

Browse files
authored
Fix bash.bashrc issue (#89)
* fix bashrc * better doc * update docker_kit
1 parent f28983e commit c0f6c2d

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.github/workflows/build-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,4 @@ jobs:
361361
--env-file /tmp/docker.env \
362362
-v $(pwd):/tmp \
363363
-w /tmp \
364-
qpod/docker-kit python /opt/utils/image-syncer/run_jobs.py
364+
${DOCKER_IMG_PREFIX:-qpod}/docker-kit python /opt/utils/image-syncer/run_jobs.py

docker_atom/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN set -x && cd /tmp \
3333
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
3434
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
3535
&& echo "ALL ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
36-
&& mv /root/.bashrc /etc/profile.d/bash.bashrc \
36+
&& mv /root/.bashrc /etc/profile.d/bash.bashrc.sh \
3737
&& LINE_SET_FLAG='export ENTER_PROFILE=$(date +%Y.%m%d.%H%M)' \
3838
&& LINE_CHK_FLAG='[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile' \
3939
# Add a check variable `ENTER_PROFILE` to see if /etc/profile is executed or not

docker_atom/work/script-setup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ EOF
4040
&& conda update --all --quiet --yes
4141

4242
# remove non-necessary folder/symlink "python3.1" exists
43-
rm -rf "${CONDA_PREFIX}"/bin/python3.1
43+
rm -rf "${CONDA_PREFIX}"/bin/python3.1 "${CONDA_PREFIX}"/lib/python3.1
4444

4545
# These conda pkgs shouldn't be removed (otherwise will cause RemoveError) since they are directly required by conda: pip setuptools pycosat pyopenssl requests ruamel_yaml
4646
# CONDA_PY_PKGS=$(conda list | grep "py3" | cut -d " " -f 1 | sed "/#/d;/conda/d;/pip/d;/setuptools/d;/pycosat/d;/pyopenssl/d;/requests/d;/ruamel_yaml/d;") \
@@ -112,7 +112,7 @@ setup_java_base() {
112112
elif [ "$VER_JDK" -gt 8 ] ; then
113113
URL_OPENJDK=${JDK_URL_MSFT}
114114
else
115-
echo "ORCA download URL ref: ${JDK_URL_ORCA}"
115+
echo "ORCA JDK8 download URL ref: ${JDK_URL_ORCA}"
116116
URL_OPENJDK="https://javadl.oracle.com/webapps/download/GetFile/1.8.0_361-b09/0ae14417abb444ebb02b9815e2103550/linux-i586/jdk-8u361-linux-${ARCH}.tar.gz"
117117
fi
118118

docker_base/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ RUN set -x && source /opt/utils/script-setup.sh \
2424
&& PYTHON_PTH_FILE=$("${CONDA_PREFIX}"/bin/python3 -c 'import sys;print(sys.path[-1]+"/usr_share.pth")') \
2525
&& echo "/usr/share/pyshared/" >> "${PYTHON_PTH_FILE}" \
2626
&& echo "/usr/share/python3/" >> "${PYTHON_PTH_FILE}" \
27-
&& rm -rf $(/usr/bin/python3 -c 'import sys; print(" ".join(i for i in sys.path if "python" in i))') /usr/bin/python3* \
28-
&& rm -rf "${CONDA_PREFIX}"/lib/python3.1 /usr/lib/python${PYTHON_VERSION} \
27+
&& rm -rf $(/usr/bin/python3 -c 'import sys; print(" ".join(i for i in sys.path if "python" in i))') /usr/bin/python3* /usr/lib/python${PYTHON_VERSION} \
2928
&& ln -sf "${CONDA_PREFIX}"/lib/python${PYTHON_VERSION} /usr/lib/ \
3029
&& ln -sf "${CONDA_PREFIX}"/bin/python3.* /usr/bin/ \
3130
&& ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python \

docker_docker_kit/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ ARG BASE_IMG="base"
55
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}
66

77
LABEL maintainer="haobibo@gmail.com"
8+
ENV XDG_RUNTIME_DIR="/tmp"
89

910
COPY work /opt/utils/
1011

1112
RUN source /opt/utils/script-setup.sh \
1213
&& setup_docker_compose && setup_docker_syncer \
1314
&& pip install -U PyYaml \
14-
&& ln -sf /usr/bin/image-syncer /opt/utils/image-syncer/
15-
16-
# Clean up and display components version information...
17-
RUN source /opt/utils/script-utils.sh && install__clean && list_installed_packages
15+
&& ln -sf /usr/bin/image-syncer /opt/utils/image-syncer/ \
16+
# Clean up and display components version information...
17+
&& source /opt/utils/script-utils.sh && install__clean && list_installed_packages

0 commit comments

Comments
 (0)