Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
3c7b51e5
Commit
3c7b51e5
authored
Oct 29, 2022
by
Dave Cooper
Browse files
try this build again and deploy to payments host.
parent
09fe962a
Pipeline
#7268
passed with stages
in 5 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docker/run
View file @
3c7b51e5
...
...
@@ -23,6 +23,8 @@ export HTTP_PORT=${HTTP_PORT:=9080}
export
HTTPS_PORT
=
${
HTTPS_PORT
:
=9443
}
export
SWANK_PORT
=
${
SWANK_PORT
:
=4200
}
USER_SRC
=
${
USER_SRC
:
=
"
`
cd
"
${
CURRDIR
}
/../"
;
pwd
`
/"
}
cd
${
CURRDIR
}
...
...
@@ -33,6 +35,11 @@ cd ${CURRDIR}
SRC_BASENAME
=
"
$(
basename
$USER_SRC
)
"
if
!
[
-z
${
USER_ALT
}
]
;
then
ALT_BASENAME
=
"
$(
basename
$USER_ALT
)
"
fi
HOST_USER_UID
=
$(
id
-u
)
HOST_USER_NAME
=
${
USER
}
...
...
@@ -81,17 +88,33 @@ echo "SRC_BASENAME=${SRC_BASENAME}"
echo
"gendl_user=
${
gendl_user
}
"
if
!
[
-z
${
USER_ALT
}
]
;
then
#
# FLAG -- duplicated code here, if you change one, change the other.
#
DOCKER_GENDL_CID
=
$(
docker run
-id
--rm
-h
gendl
--name
gendl
\
-p
${
SWANK_HOST_PORT
}
:
${
SWANK_PORT
}
-p
${
HTTP_HOST_PORT
}
:
${
HTTP_PORT
}
\
-p
${
HTTPS_HOST_PORT
}
:
${
HTTPS_PORT
}
\
-e
HTTP_PORT
-e
HTTPS_PORT
-e
HTTP_HOST_PORT
-e
HTTPS_HOST_PORT
\
-e
HOST_USER_UID
-e
SWANK_PORT
-e
SWANK_HOST_PORT
\
--mount
type
=
bind
,src
=
${
USER_SRC
}
,dst
=
/home/
${
gendl_user
}
/
${
SRC_BASENAME
}
/
\
--mount
type
=
bind
,src
=
${
USER_ALT
}
,dst
=
/home/
${
gendl_user
}
/
${
ALT_BASENAME
}
/
\
--add-host
host.docker.internal:172.17.0.1
\
dcooper8/gendl:
${
branch
}
)
else
DOCKER_GENDL_CID
=
$(
docker run
-id
--rm
-h
gendl
--name
gendl
\
-p
${
SWANK_HOST_PORT
}
:
${
SWANK_PORT
}
-p
${
HTTP_HOST_PORT
}
:
${
HTTP_PORT
}
\
-p
${
HTTPS_HOST_PORT
}
:
${
HTTPS_PORT
}
\
-e
HTTP_PORT
-e
HTTPS_PORT
-e
HTTP_HOST_PORT
-e
HTTPS_HOST_PORT
\
-e
HOST_USER_UID
-e
SWANK_PORT
-e
SWANK_HOST_PORT
\
--mount
type
=
bind
,src
=
${
USER_SRC
}
,dst
=
/home/
${
gendl_user
}
/
${
SRC_BASENAME
}
/
\
--add-host
host.docker.internal:172.17.0.1
\
dcooper8/gendl:
${
branch
}
)
fi
CID
=
$(
docker run
-id
--rm
-h
gendl
--name
gendl
\
-p
${
SWANK_HOST_PORT
}
:
${
SWANK_PORT
}
-p
${
HTTP_HOST_PORT
}
:
${
HTTP_PORT
}
\
-p
${
HTTPS_HOST_PORT
}
:
${
HTTPS_PORT
}
\
-e
HTTP_PORT
-e
HTTPS_PORT
-e
HTTP_HOST_PORT
-e
HTTPS_HOST_PORT
\
-e
HOST_USER_UID
-e
SWANK_PORT
-e
SWANK_HOST_PORT
\
--mount
type
=
bind
,src
=
${
USER_SRC
}
,dst
=
/home/
${
gendl_user
}
/
${
SRC_BASENAME
}
/
\
--add-host
host.docker.internal:172.17.0.1
\
dcooper8/gendl:
${
branch
}
)
if
[
-z
"
$CID
"
]
if
[
-z
"
$
DOCKER_GENDL_
CID
"
]
then
echo
""
echo
"Container did not start sucessfully, perhaps a name conflict with a running container?"
...
...
@@ -106,8 +129,8 @@ else
# if [ -e ~/.ssh/ ];
# then
# echo "Copying your ~/.ssh/ directory into the container as /home/${gendl_user}/.ssh/"
# docker cp ~/.ssh ${CID}:/home/${gendl_user}/.ssh
# docker exec -it --user root ${CID} chown -R ${gendl_user}:${gendl_user} /home/${gendl_user}/.ssh
# docker cp ~/.ssh ${
DOCKER_GENDL_
CID}:/home/${gendl_user}/.ssh
# docker exec -it --user root ${
DOCKER_GENDL_
CID} chown -R ${gendl_user}:${gendl_user} /home/${gendl_user}/.ssh
# fi
# echo "Making a symbolic link from /home/${HOST_USER_NAME}/ to /home/${gendl_user}/ "
...
...
@@ -115,7 +138,7 @@ else
# echo "mount when you access them on the host under /home/${HOST_USER_NAME}/..."
# if [ ${gendl_user} != ${HOST_USER_NAME} ];
# then
# docker exec -it --user root ${CID} ln -s /home/${gendl_user} /home/${HOST_USER_NAME}
# docker exec -it --user root ${
DOCKER_GENDL_
CID} ln -s /home/${gendl_user} /home/${HOST_USER_NAME}
# fi
...
...
@@ -123,7 +146,7 @@ else
echo
"New container has been started and
${
USER_SRC
}
from this host has been mounted to:"
echo
"/home/
${
gendl_user
}
/
${
SRC_BASENAME
}
/ in the container."
echo
""
echo
"The new container ID is
${
CID
}
."
echo
"The new container ID is
${
DOCKER_GENDL_
CID
}
."
echo
""
echo
"If you need slime loaded into your emacs, you can get it with:"
echo
"M-x load-file RET
${
GENDL_SRC
}
/docker/slime/slime.el RET"
...
...
@@ -134,8 +157,6 @@ else
echo
""
echo
"Container ID is:"
echo
""
echo
${
CID
}
echo
${
DOCKER_GENDL_
CID
}
fi
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment