Fails to build in dockerhub
Created by: yookoala
Looks like Dockerhub provides no way inject environment variable in the build process. So the ARG
based docker image FROM
statement fails:
https://hub.docker.com/r/cangjians/pycangjie/builds/bklokftnqnqe4en7tgnzw6h/
It is, however, possible to build images in Travis then push to dockerhub, see "Pushing a Docker Image to a Registry" in their documentaiton:
Pushing a Docker Image to a Registry
In order to push an image to a registry, one must first authenticate via
docker login
. The email, username, and password used for login should be stored in the repository settings environment variables, which may be set up through the web or locally via the Travis CLI, e.g.:travis env set DOCKER_USERNAME myusername travis env set DOCKER_PASSWORD secretsecret
Within your
.travis.yml
prior to attempting adocker push
or perhaps beforedocker pull
of a private image, e.g.:docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"