GithubHelp home page GithubHelp logo

Comments (9)

yunus-qureshi avatar yunus-qureshi commented on May 24, 2024

As the oracle user is created during build there is no default .bashrc for oracle user to begin with.

from docker-images.

3ronco avatar 3ronco commented on May 24, 2024

In previous versions of the oracle/database image this was handled correctly.
The creation of the user at image buildtime is irrelevant for this. It is used as soon as you start a new container for any bash invocation, as this might be a tiny detail looking not very important, your change can issue problems for people not knowing that ~/.bashrc in your image behaves different than in any other distro especially when you need to embed customized executables via PATH var or global settings via /etc/bashrc eg. when you use scripts for database initialization in /docker-entrypoint-initdb.d/{startup,setup}

from docker-images.

yunus-qureshi avatar yunus-qureshi commented on May 24, 2024

export ORACLE_SID=${ORACLE_SID^^}' > .bashrc

@3ronco what I meant was that the above cmd is what creates .bashrc as it was not existing before that so > or >> does not make a difference

from docker-images.

3ronco avatar 3ronco commented on May 24, 2024

@yunus-qureshi ok, when i run buildContainerImage.sh the resulting image contains the file:

me@myMachine:~ $ docker run -ti --rm --entrypoint "" oracle/database:19.3.0-ee /bin/bash
[oracle@fa40941978bf ~]$ ls -la
total 20
drwx------ 1 oracle oinstall 104 Mar 25 17:16 .
drwxr-xr-x 1 root   root      12 Mar 25 17:16 ..
-rw-r--r-- 1 oracle oinstall  18 Nov 23  2021 .bash_logout
-rw-r--r-- 1 oracle oinstall 193 Nov 23  2021 .bash_profile
-rw-r--r-- 1 oracle oinstall 300 Mar 25 17:21 .bashrc
-rw-r--r-- 1 oracle oinstall 172 Aug  9  2022 .kshrc
lrwxrwxrwx 1 root   root      26 Mar 25 17:16 setPassword.sh -> /opt/oracle/setPassword.sh
[oracle@fa40941978bf ~]$ cat .bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

from docker-images.

yunus-qureshi avatar yunus-qureshi commented on May 24, 2024

@3ronco i see, we'll check and get back on this. I am surprised that it even contains .kshrc as we don't install ksh.

from docker-images.

oraclesean avatar oraclesean commented on May 24, 2024

I think there's a case for performing >> vs > should an image include a custom .bashrc introduced via modifications in the build scripts.

from docker-images.

oraclesean avatar oraclesean commented on May 24, 2024

@yunus-qureshi I believe that ksh gets installed by oracle-database-preinstall-*; ksh is a long-standing prerequisite for Oracle databases:

# yum install -y oracle-database-preinstall-19c

...

Dependencies Resolved

========================================================================================================================================================================================================================
 Package                                                      Arch                                 Version                                                               Repository                                Size
========================================================================================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                               x86_64                               1.0-3.el7                                                             ol7_latest                                27 k
Installing for dependencies:

...

 ksh                                                          x86_64                               20120801-144.0.1.el7_9                                                ol7_latest                               882 k

...

---> Package ksh.x86_64 0:20120801-144.0.1.el7_9 will be installed

from docker-images.

yunus-qureshi avatar yunus-qureshi commented on May 24, 2024

I see. Thank you @oraclesean

from docker-images.

3ronco avatar 3ronco commented on May 24, 2024

Thanks for your efforts 👍

from docker-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.