1

I need to be able to :

-- RUN apk add --no-cache autossh

for migrating my project into alpine linux from ubuntu

I'm getting an error while building the Dockerfile.. any workarounds? I cannot get rid of the autossh requirement as I need this to connect to me compose db.

ERROR: unsatisfiable constraints:
  autossh (missing):
    required by: world[autossh]
The command '/bin/sh -c apk add --no-cache autossh' returned a non-zero code: 1
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
sambehera
  • 959
  • 3
  • 13
  • 33

2 Answers2

3

Package autossh is in the community repository and only edge branch, as you can check on pkgs.alpinelinux.org. Alpine has only main from a stable branch in /etc/apk/repositories by default, so to install package from another repository and branch, you have to add it here, e.g.:

echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
apk update
Jakub Jirutka
  • 10,269
  • 4
  • 42
  • 35
0

Please try running apk update before that in docker file. Hope it works

Karthik427
  • 11
  • 3
  • Agreed. autossh is an alpine package: https://pkgs.alpinelinux.org/package/edge/community/x86_64/autossh so update will probably get it for you – Mano Marks Sep 08 '16 at 20:29