3

I am trying to create a container with the following Dockerfile:

FROM python:3.6-alpine

RUN apk add --update alpine-sdk make gcc python3-dev python-dev libxslt-dev \
     libxml2-dev libc-dev openssl-dev libffi-dev zlib-dev py-pip openssh \
     py3-lxml@main py3-numpy@community \
     mariadb-dev libjpeg-dev zlib1g-dev && rm -rf /var/cache/apk/*

I added py3-lxml@main and py3-numpy@community based on this advice as building wheel for numpy and lxml takes ages.

I have used the package names as specified on the official Alpine repo page, but I get the following error:

WARNING: The repository tag for world dependency 'py3-lxml@main' does not exist
WARNING: The repository tag for world dependency 'py3-numpy@community' does not exist*

Why is that and how can I get those packages?

Nikolay Shindarov
  • 1,616
  • 2
  • 18
  • 25

1 Answers1

2

In order to fix this problem in specific:

WARNING: The repository tag for world dependency 'py3-lxml@main' does not exist
WARNING: The repository tag for world dependency 'py3-numpy@community' does not exist

You need to update the repositories file which is in here /etc/apk/repositories to the following unless you want to remove the @community and @main tags from the apk add command as they are not written by default in the repositories file:

@main http://dl-cdn.alpinelinux.org/alpine/v3.9/main
@community http://dl-cdn.alpinelinux.org/alpine/v3.9/community

And don't forget to COPY it the content to /etc/apk/repositories

Mostafa Hussein
  • 11,063
  • 3
  • 36
  • 61
  • Thanks. I eneded up removing the ```@community``` and ```@main``` tags. What do you mean by "And don't forget to COPY it the content to /etc/apk/repositories" - which content? – Nikolay Shindarov Mar 02 '19 at 15:02
  • that was in case you decided to go with adding `@community` and `@main` as shown in my answer then you have to use `ADD repositories /etc/apk/repositories` to update the alpine image before usign `apk add` – Mostafa Hussein Mar 02 '19 at 15:03