diff --git a/.docker/Dockerfile b/.docker/Dockerfile deleted file mode 100644 index 7405829baf94..000000000000 --- a/.docker/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM alpine:3.15 - -RUN addgroup -S ory; \ - adduser -S ory -G ory -D -u 10000 -h /home/ory -s /bin/nologin; \ - chown -R ory:ory /home/ory - -RUN apk add -U --no-cache ca-certificates - -COPY kratos /usr/bin/kratos - -# Exposing the ory home directory to simplify passing in Kratos configuration (e.g. if the file $HOME/.kratos.yaml -# exists, it will be automatically used as the configuration file). -VOLUME /home/ory - -# Declare the standard ports used by Kratos (4433 for public service endpoint, 4434 for admin service endpoint) -EXPOSE 4433 4434 - -USER 10000 - -ENTRYPOINT ["kratos"] -CMD ["serve"] diff --git a/.docker/Dockerfile-alpine b/.docker/Dockerfile-alpine index 7405829baf94..f82deec51bdb 100644 --- a/.docker/Dockerfile-alpine +++ b/.docker/Dockerfile-alpine @@ -1,13 +1,27 @@ FROM alpine:3.15 +# Because this image supports SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user +# and declare /home/ory/sqlite a volume. +# +# To get SQLite and Docker Volumes working with this image, mount the volume where SQLite should be written to at: +# +# /home/ory/sqlite/some-file. + RUN addgroup -S ory; \ adduser -S ory -G ory -D -u 10000 -h /home/ory -s /bin/nologin; \ chown -R ory:ory /home/ory - RUN apk add -U --no-cache ca-certificates +WORKDIR /home/ory + COPY kratos /usr/bin/kratos +# By creating the sqlite folder as the ory user, the mounted volume will be owned by ory:ory, which +# is required for read/write of SQLite. +RUN mkdir -p /var/lib/sqlite +RUN chown ory:ory /var/lib/sqlite +VOLUME /var/lib/sqlite + # Exposing the ory home directory to simplify passing in Kratos configuration (e.g. if the file $HOME/.kratos.yaml # exists, it will be automatically used as the configuration file). VOLUME /home/ory diff --git a/.docker/Dockerfile-goreleaser b/.docker/Dockerfile-goreleaser deleted file mode 100644 index e7358af9c58a..000000000000 --- a/.docker/Dockerfile-goreleaser +++ /dev/null @@ -1,22 +0,0 @@ -FROM oryd/xgoreleaser:1.14.4-0.138.0 - -WORKDIR /home/ory - -ADD go.mod go.mod -ADD go.sum go.sum - -RUN go mod download - -ENV RELEASE_NAME=v0.0.0-alpha.1 -ENV DOCKER_SHORT_TAG=v0.0.0-alpha.1 - -ADD . . -ENTRYPOINT ["goreleaser"] -CMD ["--snapshot", "--skip-publish", "--rm-dist"] - -# Manual for debugging: -# docker rm -f build || true; docker build -f .docker/Dockerfile-goreleaser -t build .; docker run build -# -# or: -# docker rm -f build || true; docker build -f .docker/Dockerfile-goreleaser -t build .; docker run --cpus 6 --name build --entrypoint /bin/bash -it build -# goreleaser --snapshot --skip-publish --rm-dist diff --git a/.docker/Dockerfile-sqlite b/.docker/Dockerfile-sqlite deleted file mode 100644 index bd0194ee9b81..000000000000 --- a/.docker/Dockerfile-sqlite +++ /dev/null @@ -1,35 +0,0 @@ -FROM alpine:3.15 - -# Because this image is built for SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user -# and declare /home/ory/sqlite a volume. -# -# To get SQLite and Docker Volumes working with this image, mount the volume where SQLite should be written to at: -# -# /home/ory/sqlite/some-file. - -RUN addgroup -S ory; \ - adduser -S ory -G ory -D -u 10000 -h /home/ory -s /bin/nologin; \ - chown -R ory:ory /home/ory -RUN apk add -U --no-cache ca-certificates - -WORKDIR /home/ory - -COPY kratos /usr/bin/kratos - -# By creating the sqlite folder as the ory user, the mounted volume will be owned by ory:ory, which -# is required for read/write of SQLite. -RUN mkdir -p /var/lib/sqlite -RUN chown ory:ory /var/lib/sqlite -VOLUME /var/lib/sqlite - -# Exposing the ory home directory to simplify passing in Kratos configuration (e.g. if the file $HOME/.kratos.yaml -# exists, it will be automatically used as the configuration file). -VOLUME /home/ory - -# Declare the standard ports used by Kratos (4433 for public service endpoint, 4434 for admin service endpoint) -EXPOSE 4433 4434 - -USER 10000 - -ENTRYPOINT ["kratos"] -CMD ["serve"] diff --git a/Makefile b/Makefile index e1160c66ff4e..fd2eed3ab807 100644 --- a/Makefile +++ b/Makefile @@ -116,13 +116,13 @@ sdk: .bin/swagger .bin/ory node_modules .PHONY: quickstart quickstart: - docker pull oryd/kratos:latest-sqlite + docker pull oryd/kratos:latest docker pull oryd/kratos-selfservice-ui-node:latest docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate .PHONY: quickstart-dev quickstart-dev: - docker build -f .docker/Dockerfile-build -t oryd/kratos:latest-sqlite . + docker build -f .docker/Dockerfile-build -t oryd/kratos:latest . docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-latest.yml $(QUICKSTART_OPTIONS) up --build --force-recreate # Formats the code @@ -135,7 +135,7 @@ format: .bin/goimports docs/node_modules node_modules # Build local docker image .PHONY: docker docker: - DOCKER_BUILDKIT=1 docker build -f .docker/Dockerfile-build --build-arg=COMMIT=$(VCS_REF) --build-arg=BUILD_DATE=$(BUILD_DATE) -t oryd/kratos:latest-sqlite . + DOCKER_BUILDKIT=1 docker build -f .docker/Dockerfile-build --build-arg=COMMIT=$(VCS_REF) --build-arg=BUILD_DATE=$(BUILD_DATE) -t oryd/kratos:latest . # Runs the documentation tests .PHONY: test-docs diff --git a/quickstart-crdb.yml b/quickstart-crdb.yml index 80f532e5fcd2..3492b92a63c6 100644 --- a/quickstart-crdb.yml +++ b/quickstart-crdb.yml @@ -2,12 +2,12 @@ version: '3.7' services: kratos-migrate: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4 kratos: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4 diff --git a/quickstart-latest.yml b/quickstart-latest.yml index aadf7a92e66b..840ee0e62253 100644 --- a/quickstart-latest.yml +++ b/quickstart-latest.yml @@ -2,7 +2,7 @@ version: '3.7' services: kratos-migrate: - image: oryd/kratos:latest-sqlite + image: oryd/kratos:latest kratos: - image: oryd/kratos:latest-sqlite + image: oryd/kratos:latest diff --git a/quickstart-mysql.yml b/quickstart-mysql.yml index 1ccc0c177e5c..b6a77b5d348d 100644 --- a/quickstart-mysql.yml +++ b/quickstart-mysql.yml @@ -2,12 +2,12 @@ version: '3.7' services: kratos-migrate: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4 kratos: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4 diff --git a/quickstart-postgres.yml b/quickstart-postgres.yml index c058888f4275..b07a1adf2003 100644 --- a/quickstart-postgres.yml +++ b/quickstart-postgres.yml @@ -2,12 +2,12 @@ version: '3.7' services: kratos-migrate: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=postgres://kratos:secret@postgresd:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4 kratos: - image: oryd/kratos: + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=postgres://kratos:secret@postgresd:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4 diff --git a/quickstart-standalone.yml b/quickstart-standalone.yml index 8c799284299f..03216610beb5 100644 --- a/quickstart-standalone.yml +++ b/quickstart-standalone.yml @@ -1,7 +1,7 @@ version: '3.7' services: - kratos-selfservice-ui-node: + kratos-selfservice-ui-node:v0.8.0-alpha.3 ports: - "4455:4455" environment: diff --git a/quickstart.yml b/quickstart.yml index dcdbd9b6e02f..82558d06bb19 100644 --- a/quickstart.yml +++ b/quickstart.yml @@ -2,7 +2,7 @@ version: '3.7' services: kratos-migrate: - image: oryd/kratos:-sqlite + image: oryd/kratos:v0.8.0-alpha.3 environment: - DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true&mode=rwc volumes: @@ -19,7 +19,7 @@ services: - intranet kratos-selfservice-ui-node: - image: oryd/kratos-selfservice-ui-node: + image: oryd/kratos-selfservice-ui-node:v0.8.0-alpha.3 environment: - KRATOS_PUBLIC_URL=http://kratos:4433/ - KRATOS_BROWSER_URL=http://127.0.0.1:4433/