Unable to run docker-compose from ssh's shellHow do I fix ssh on a macMake PATH variable changes permanent on openSuserun script as user who has nologin shellHow to Update Text in File within Unix Shell ScriptPerl command line + add PATH before string in fileChange openssh default PATHGitlab CI - Deploy via SSH to remote servercommand not found when using docker containerrsync fails in crontabUnable to ssh to gcloud VM instance from google/cloud-sdk:alpine docker container
If I no longer control a permanent when it would be sacrificed, is it still sacrificed?
Make me a minimum magic sum
Who filmed the Apollo 11 trans-lunar injection?
Hostile Divisor Numbers
Can an Iranian citizen enter the USA on a Dutch passport?
Does Thanos's ship land in the middle of the battlefield in "Avengers: Endgame"?
What do you call a painting painted on a wall?
How to deal with employer who keeps me at work after working hours
Why doesn't a particle exert force on itself?
Installing Debian 10, upgrade to stable later?
Which "exotic salt" can lower water's freezing point by –70 °C?
Can a player choose to add detail and flavor to their character's spells and abilities?
How important are good looking people in a novel/story?
Where to draw the line between quantum mechanics theory and its interpretation(s)?
How is Pauli's exclusion principle still valid in these cases?
Picking a theme as a discovery writer
Was there a dinosaur-counter in the original Jurassic Park movie?
Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?
Python 3 - simple temperature program version 1.3
The selling of the sheep
What does のそ mean on this picture?
Why does blending blueberries, milk, banana and vanilla extract cause the mixture to have a yogurty consistency?
What is monoid homomorphism exactly?
Why is the blank symbol not considered part of the input alphabet of a Turing machine?
Unable to run docker-compose from ssh's shell
How do I fix ssh on a macMake PATH variable changes permanent on openSuserun script as user who has nologin shellHow to Update Text in File within Unix Shell ScriptPerl command line + add PATH before string in fileChange openssh default PATHGitlab CI - Deploy via SSH to remote servercommand not found when using docker containerrsync fails in crontabUnable to ssh to gcloud VM instance from google/cloud-sdk:alpine docker container
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm working on setting up a script in my .gitlab-ci.yml file so that I'm able to deploy a newly built Docker image to my server.
Here is how it looks so far:
- ssh deploy@my.private.vps '/bin/sh -c "cd /home/project/some/directory &&
export PATH=/bin:/usr/bin:/usr/local/bin &&
docker-compose stop web &&
docker-compose rm -f web &&
docker-compose up -d web &&
docker-compose exec web php artisan storage:link &&
exit"'
However, I keep getting "docker-compose: command not found" when running the command. Of course, docker-compose is install and available for the user 'deploy' when I log in with the user.
I found during my researches that it was because SSH doesn't load usr/local/bin by default. I tried to solve this issue by enabling the user's profile in the /etc/ssh/sshd_config file, and to export the PATH when running the script.
I'm running out of ideas on what I should try next.
What should I do?
Any idea welcome
ssh bash shell
add a comment |
I'm working on setting up a script in my .gitlab-ci.yml file so that I'm able to deploy a newly built Docker image to my server.
Here is how it looks so far:
- ssh deploy@my.private.vps '/bin/sh -c "cd /home/project/some/directory &&
export PATH=/bin:/usr/bin:/usr/local/bin &&
docker-compose stop web &&
docker-compose rm -f web &&
docker-compose up -d web &&
docker-compose exec web php artisan storage:link &&
exit"'
However, I keep getting "docker-compose: command not found" when running the command. Of course, docker-compose is install and available for the user 'deploy' when I log in with the user.
I found during my researches that it was because SSH doesn't load usr/local/bin by default. I tried to solve this issue by enabling the user's profile in the /etc/ssh/sshd_config file, and to export the PATH when running the script.
I'm running out of ideas on what I should try next.
What should I do?
Any idea welcome
ssh bash shell
add a comment |
I'm working on setting up a script in my .gitlab-ci.yml file so that I'm able to deploy a newly built Docker image to my server.
Here is how it looks so far:
- ssh deploy@my.private.vps '/bin/sh -c "cd /home/project/some/directory &&
export PATH=/bin:/usr/bin:/usr/local/bin &&
docker-compose stop web &&
docker-compose rm -f web &&
docker-compose up -d web &&
docker-compose exec web php artisan storage:link &&
exit"'
However, I keep getting "docker-compose: command not found" when running the command. Of course, docker-compose is install and available for the user 'deploy' when I log in with the user.
I found during my researches that it was because SSH doesn't load usr/local/bin by default. I tried to solve this issue by enabling the user's profile in the /etc/ssh/sshd_config file, and to export the PATH when running the script.
I'm running out of ideas on what I should try next.
What should I do?
Any idea welcome
ssh bash shell
I'm working on setting up a script in my .gitlab-ci.yml file so that I'm able to deploy a newly built Docker image to my server.
Here is how it looks so far:
- ssh deploy@my.private.vps '/bin/sh -c "cd /home/project/some/directory &&
export PATH=/bin:/usr/bin:/usr/local/bin &&
docker-compose stop web &&
docker-compose rm -f web &&
docker-compose up -d web &&
docker-compose exec web php artisan storage:link &&
exit"'
However, I keep getting "docker-compose: command not found" when running the command. Of course, docker-compose is install and available for the user 'deploy' when I log in with the user.
I found during my researches that it was because SSH doesn't load usr/local/bin by default. I tried to solve this issue by enabling the user's profile in the /etc/ssh/sshd_config file, and to export the PATH when running the script.
I'm running out of ideas on what I should try next.
What should I do?
Any idea welcome
ssh bash shell
ssh bash shell
asked Apr 27 at 15:23
JaegerJaeger
1158
1158
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use
which docker-compose
or
whereis docker-compose
to find out what is its absolute path.
Make sure this path is added to your PATH env.
You can also just change your docker-compose into fullpath commands:
/usr/local/bin/docker-compose stop web (...)
That's a good idea, I ended up running commands such as/usr/local/bin/docker-compose exec <some command>
– Jaeger
Apr 29 at 19:51
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964859%2funable-to-run-docker-compose-from-sshs-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use
which docker-compose
or
whereis docker-compose
to find out what is its absolute path.
Make sure this path is added to your PATH env.
You can also just change your docker-compose into fullpath commands:
/usr/local/bin/docker-compose stop web (...)
That's a good idea, I ended up running commands such as/usr/local/bin/docker-compose exec <some command>
– Jaeger
Apr 29 at 19:51
add a comment |
Use
which docker-compose
or
whereis docker-compose
to find out what is its absolute path.
Make sure this path is added to your PATH env.
You can also just change your docker-compose into fullpath commands:
/usr/local/bin/docker-compose stop web (...)
That's a good idea, I ended up running commands such as/usr/local/bin/docker-compose exec <some command>
– Jaeger
Apr 29 at 19:51
add a comment |
Use
which docker-compose
or
whereis docker-compose
to find out what is its absolute path.
Make sure this path is added to your PATH env.
You can also just change your docker-compose into fullpath commands:
/usr/local/bin/docker-compose stop web (...)
Use
which docker-compose
or
whereis docker-compose
to find out what is its absolute path.
Make sure this path is added to your PATH env.
You can also just change your docker-compose into fullpath commands:
/usr/local/bin/docker-compose stop web (...)
answered Apr 28 at 17:55
ComarComar
27116
27116
That's a good idea, I ended up running commands such as/usr/local/bin/docker-compose exec <some command>
– Jaeger
Apr 29 at 19:51
add a comment |
That's a good idea, I ended up running commands such as/usr/local/bin/docker-compose exec <some command>
– Jaeger
Apr 29 at 19:51
That's a good idea, I ended up running commands such as
/usr/local/bin/docker-compose exec <some command>– Jaeger
Apr 29 at 19:51
That's a good idea, I ended up running commands such as
/usr/local/bin/docker-compose exec <some command>– Jaeger
Apr 29 at 19:51
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964859%2funable-to-run-docker-compose-from-sshs-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown