anvilresearch / connect

A modern authorization server built to authenticate your users and protect your APIs
http://anvil.io
MIT License
361 stars 86 forks source link

Trouble with docker compose #316

Open blocka opened 8 years ago

blocka commented 8 years ago

After running nvl init I ran docker-compose up and I got

ERROR: unsatisfiable constraints: nginx-1.8.1-r0: breaks: world[nginx=1.8.0-r1] ERROR: Service 'nginx' failed to build: The command '/bin/sh -c apk update && apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} && rm -rf /var/cache/apk/*' returned a non-zero code: 1

blocka commented 8 years ago

Let me know if any more info is necessary. This was on a fresh ec2 ubuntu 14.04 ami. Installed docker/docker compose as per the instructions on their website.

blocka commented 8 years ago

I was able to get it working when I copied the Dockerfile from the git repo.

NicolasBonduel commented 7 years ago

I had a similar issue today when trying to run the current version.

I fixed it by editing this line: https://github.com/anvilresearch/connect-cli/blob/7800a3a61a3589013a2923654ab06bdff48307d4/templates/nginx/Dockerfile#L15 to the release -r1

I know that @LegallyGeek is working on updating the dependencies, so hopefully it will be fixed soon =)

LegallyGeek commented 7 years ago

Thank you @NicolasBonduel for the fix. I'm working my way that direction now.

LegallyGeek commented 7 years ago

@NicolasBonduel, @christiansmith and I just released an updated Anvil Connect that provides for updated dependencies and removed legacy packages.

dustinsmith1024 commented 7 years ago

I just went through the install today and had a similar error. You release the changes to NPM already? Ill keep looking, but just wanted to post since you said you just released. @LegallyGeek

Im running on my mac.

▶ sso master ✗ docker-compose up -d
Building nginx
Step 1/10 : FROM alpine:3.2
 ---> 39be345c901f
Step 2/10 : MAINTAINER Anvil Research, Inc. <smith@anvil.io>
 ---> Using cache
 ---> 7c6a6433fda7
Step 3/10 : ENV NGINX_VERSION 1.8.1
 ---> Using cache
 ---> 01992c5a2c6d
Step 4/10 : ENV NGINX_VERSION_RELEASE -r0
 ---> Using cache
 ---> de66032b200a
Step 5/10 : RUN apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*
 ---> Running in 2d13146cbd64
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
v3.2.3-466-g3398d0d [http://dl-cdn.alpinelinux.org/alpine/v3.2/main]
OK: 5294 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  nginx-1.8.1-r1:
    breaks: world[nginx=1.8.1-r0]
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*' returned a non-zero code: 1

Update: The -r1 change in nginx dockerfile fixed it for me.

NicolasBonduel commented 7 years ago

I also had to update the dockerfile manually with the last version. The version 0.2.0 is indeed updated, however "anvil-connect-cli" has not been updated for over a year.

christiansmith commented 7 years ago

Updates to CLI are on the way.

ernsheong commented 7 years ago

Just to confirm that I am also seeing this issue on a everything-fresh install today.

Step 5/10 : RUN apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*
 ---> Running in 36884db4059e
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
v3.2.3-466-g3398d0d [http://dl-cdn.alpinelinux.org/alpine/v3.2/main]
OK: 5294 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  nginx-1.8.1-r1:
    breaks: world[nginx=1.8.1-r0]
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*' returned a non-zero code: 1
ernsheong commented 7 years ago

@NicolasBonduel I've edited the file in $HOME/.nvm/versions/node/v6.11.2/lib/node_modules/anvil-connect-cli/templates/nginx/Dockerfile to -r1 but Docker can't seem to pick it up. Where else do I need to make changes, or what other commands do I need to run?

Oops, found it one level up from the connect directory 😝 (sorry, Docker newbie)

fkubis commented 5 years ago

I getting the same issue on a fresh server.

root@anviltest:/var/anvil# docker-compose up
Building nginx
Step 1/10 : FROM alpine:3.2
 ---> 4558d96d24b5
Step 2/10 : MAINTAINER Anvil Research, Inc. <smith@anvil.io>
 ---> Using cache
 ---> e6e10f67dd95
Step 3/10 : ENV NGINX_VERSION 1.8.1
 ---> Using cache
 ---> 4e0f6eb69289
Step 4/10 : ENV NGINX_VERSION_RELEASE -r0
 ---> Using cache
 ---> ed60753321c7
Step 5/10 : RUN apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*
 ---> Running in 8377495eee10
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
v3.2.3-474-g10ee65f [http://dl-cdn.alpinelinux.org/alpine/v3.2/main]
OK: 5294 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  nginx-1.8.1-r1:
    breaks: world[nginx=1.8.1-r0]
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c apk update &&     apk add --update nginx=${NGINX_VERSION}${NGINX_VERSION_RELEASE} &&     rm -rf /var/cache/apk/*' returned a non-zero code: 1
root@anviltest:/var/anvil# uname -a
Linux anviltest 4.15.0-1030-azure #31-Ubuntu SMP Tue Oct 30 18:35:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@anviltest:/var/anvil# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04