Support for podman #9
|
@ -1,7 +1,7 @@
|
|||
FROM "ubuntu:22.04"
|
||||
WORKDIR /usr/scripts
|
||||
cody marked this conversation as resolved
|
||||
ADD ["scripts/make_gcc.sh", "/usr/scripts"]
|
||||
WORKDIR /usr
|
||||
WORKDIR /tmp
|
||||
cody marked this conversation as resolved
Outdated
cody
commented
For temporary working spaces to compile programs it would be preferable to use For temporary working spaces to compile programs it would be preferable to use `/tmp` or `$HOME` instead of `/usr` to conform to normal *NIX conventions.
|
||||
RUN apt update && /usr/scripts/make_gcc.sh
|
||||
|
||||
WORKDIR /usr/scripts
|
||||
|
@ -12,6 +12,7 @@ ADD ["scripts/install_pop-fe.sh", "scripts/run_pop_fe.sh", "/usr/scripts"]
|
|||
WORKDIR /usr/jaby_engine/bin/extern
|
||||
RUN apt update && /usr/scripts/install_pop-fe.sh
|
||||
|
||||
WORKDIR /project
|
||||
ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}"
|
||||
ENV JABY_ENGINE_PATH=/jaby_engine
|
||||
ENV JABY_ENGINE_DIR=/jaby_engine
|
||||
cody marked this conversation as resolved
Outdated
cody
commented
Never set workdir to Never set workdir to `/jaby_engine` or some other potentially useful directory? is it intended to be in `/user/jaby_engine/bin/extern`?
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
podman build -t jaby_engine .
|
||||
|
||||
if [[ -z "${JABY_ENGINE_PATH}" ]]; then
|
||||
echo "Setting JABY_ENGINE_PATH to parent folder"
|
||||
echo "Setting JABY_ENGINE_PATH to parent folder"
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
|
||||
JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")"
|
||||
cat << End >> ~/.profile
|
||||
export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"
|
||||
End
|
||||
source ~/.profile
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
|
||||
export JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")"
|
||||
if cat /etc/passwd | grep $USER | grep bash > /dev/null; then
|
||||
cody marked this conversation as resolved
Outdated
cody
commented
This will not work as expected on any distro that does not use bash by default. You could echo an example of what to add to your "bashrc" and let users add it to the correct rc file for their shell. This will not work as expected on any distro that does not use bash by default. You could echo an example of what to add to your "bashrc" and let users add it to the correct rc file for their shell.
cody
commented
for example
so that people with alternate shells will still be able to use your tools. for example
```
echo "Please ensure that you source ~/.profile in your shell rc"
```
so that people with alternate shells will still be able to use your tools.
cody
commented
or use
or use
```bash
if cat /etc/passwd | grep $USER | grep bash; then
# do stuff if they use bash
else
# warn the users then need to add the export statement to their shell RC
fi
```
|
||||
# Bash found
|
||||
echo "export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"" >> ~/.bashrc
|
||||
|
||||
else
|
||||
# No bash found
|
||||
echo "Please add export JABY_ENGINE_PATH="$JABY_ENGINE_PATH" to your shell profile"
|
||||
fi
|
||||
fi
|
|
@ -61,5 +61,5 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
|
||||
echo "<<< Delete GCC folder >>>"
|
||||
cd /usr
|
||||
cd /tmp
|
||||
rm -fr psx-gcc
|
Loading…
Reference in New Issue
Potentially not needed?