Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Alpine: Fix 'remove' is not an apk command
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schmidt <publicarray@users.noreply.github.com>
  • Loading branch information
publicarray committed Jul 8, 2018
1 parent 09a83ce commit ac1a6ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libmachine/provision/alpine.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (provisioner *AlpineProvisioner) Package(name string, action pkgaction.Pack
case pkgaction.Install, pkgaction.Upgrade:
packageAction = "add"
case pkgaction.Remove:
packageAction = "remove"
packageAction = "del"
}

switch name {
Expand Down Expand Up @@ -137,7 +137,7 @@ func (provisioner *AlpineProvisioner) Provision(swarmOptions swarm.Options, auth
}

log.Debug("Add Community repo")
if _, err := provisioner.SSHCommand("if ! apk info docker >/dev/null; then ver=$(awk '{split($1,a,\".\"); print a[1]\".\"a[2]}' /etc/alpine-release); echo \"http://dl-cdn.alpinelinux.org/alpine/v$ver/community\" >> /etc/apk/repositories; apk update; fi"); err != nil {
if _, err := provisioner.SSHCommand("if ! which docker >/dev/null && ! apk info docker >/dev/null; then ver=$(awk '{split($1,a,\".\"); print a[1]\".\"a[2]}' /etc/alpine-release); echo \"http://dl-cdn.alpinelinux.org/alpine/v$ver/community\" >> /etc/apk/repositories; apk update; fi"); err != nil {
return err
}

Expand Down

0 comments on commit ac1a6ff

Please sign in to comment.