-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b48943c
commit cc900f5
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:14.04.4 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update -qq ; apt-get upgrade ; \ | ||
apt-get install -y gridengine-client ; \ | ||
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
# dummy user account | ||
RUN useradd -m dummy | ||
RUN echo "dummy:dummy" | chpasswd | ||
# | ||
ADD setup.sh /usr/local/bin/setup.sh | ||
RUN chmod +x /usr/local/bin/setup.sh | ||
|
||
# | ||
ENTRYPOINT ["/usr/local/bin/setup.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# docker-sge-client | ||
Sun Gridengine Client in Docker | ||
|
||
# HOW TO RUN | ||
|
||
``` | ||
docker run -e RUNUSER_USERNAME=manabu -e RUNUSER_UID=2000 -e RUNUSER_GID=2000 -e RUNUSER_HOME=$HOME -v $HOME:$HOME:ro --rm --net=host -ti -v $PWD/act_qmaster:/var/lib/gridengine/default/common/act_qmaster --name sgetest manabuishii/docker-sge-client:0.1.0 /bin/bash | ||
``` | ||
|
||
# NOTE | ||
|
||
- --net=host means your docker container connect with docker host name | ||
- submit user name is important. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
YOURSGEMASTERHOSTHERE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# RUNUSER_USERNAME | ||
if [ ! -n "${RUNUSER_USERNAME-}" ] ; then | ||
echo "RUNUSER_USERNAME is not set or empty" | ||
exit 1 | ||
fi | ||
# RUNUSER_UID | ||
if [ ! -n "${RUNUSER_UID-}" ] ; then | ||
echo "RUNUSER_UID is not set or empty" | ||
exit 1 | ||
fi | ||
# RUNUSER_GID | ||
if [ ! -n "${RUNUSER_GID-}" ] ; then | ||
echo "RUNUSER_GID is not set or empty" | ||
exit 1 | ||
fi | ||
# RUNUSER_HOME | ||
if [ ! -n "${RUNUSER_HOME-}" ] ; then | ||
echo "RUNUSER_HOME is not set or empty" | ||
exit 1 | ||
fi | ||
|
||
|
||
groupmod --gid $RUNUSER_GID dummy | ||
usermod --uid $RUNUSER_UID --gid $RUNUSER_GID --login $RUNUSER_USERNAME dummy | ||
|
||
#su - $RUNUSER_USERNAME -c "cd ${RUNUSER_HOME};export HOME=${RUNUSER_HOME};$*" | ||
su - $RUNUSER_USERNAME -c "$*" | ||
|