Skip to content

Commit

Permalink
fix: dockerfile clean up
Browse files Browse the repository at this point in the history
Closes #2070
  • Loading branch information
aeneasr committed Dec 16, 2021
1 parent 7507a58 commit 52420cc
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 93 deletions.
21 changes: 0 additions & 21 deletions .docker/Dockerfile

This file was deleted.

16 changes: 15 additions & 1 deletion .docker/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 0 additions & 22 deletions .docker/Dockerfile-goreleaser

This file was deleted.

35 changes: 0 additions & 35 deletions .docker/Dockerfile-sqlite

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions quickstart-crdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions quickstart-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions quickstart-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions quickstart-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion quickstart-standalone.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/
Expand Down

0 comments on commit 52420cc

Please sign in to comment.