Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

docker: command not found

I'm really at a loss here, for some reason I keep getting the following error when I try to use atlassian/scp-deploy:1.4.1 for deploying a tar file.

 

My YML:

 

image: node:18.16.0

options:

max-time: 15

docker: true

definitions:

caches:

npm: $HOME/.npm

services:

docker:

memory: 3072

steps:

- step: &NodeProd

name: Build Production

# image: node:18.16.0

script:

- cd ./app

- npm ci

- npm run build

- cd ..

- tar -zcf build.tar.gz ./app

artifacts:

- ./build.tar.gz

caches:

- npm

- step: &DeployProd

image: atlassian/default-image

services:

- docker

script:

- docker version

- pipe: atlassian/scp-deploy:1.4.1

variables:

USER: $USER

SERVER: $IP

REMOTE_PATH: $PATH

LOCAL_PATH: './theme.tar.gz'

DEBUG: 'true'

branches:

main:

- step: *NodeProd

- step:

<<: *DeployProd

name: "Deployment to Production"

trigger: automatic

deployment: production

 

As soon as it hits the deploy step it errors out on `docker version` with the following error output:

+ docker version

bash: docker: command not found

bash: lesspipe: command not found

bash: dircolors: command not found

 

As far as I know I'm doing everything according to the book and I have other pipelines where I dont explicitly have declared the docker service and it seems to work.

I initially opted to just use scp, but apparently I'm also getting a "scp: command not found", hence the reason i opted for scp-deploy but that also doesn't seem to work.

So what am I doing wrong here?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 26, 2023

Hello @adam_dwvd and welcome to the Community!

From the symptoms of the issue, I think you might have an user-defined environment variable configured either at the workspace, repository, or deployment level that is replacing the PATH variable, causing the shell to not find the docker binary inside the image.

So I would suggest checking if a variable named PATH does exist and if yes, either delete it or rename it. The default PATH environment variable where the binaries exist can get overridden with this user-supplied PATH variable, and therefore result in these binaries not being able to be located.

Thank you, @adam_dwvd !
Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events