Skip to content

Commit

Permalink
Merge pull request #362 from Security-Onion-Solutions/jertel/krup
Browse files Browse the repository at this point in the history
upgrade kratos
  • Loading branch information
jertel authored Mar 4, 2024
2 parents 6c66ff1 + dacffa8 commit 3d5cd01
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Dockerfile.kratos
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.

FROM ghcr.io/security-onion-solutions/golang:alpine AS builder
FROM ghcr.io/security-onion-solutions/golang:1.21 AS builder

ARG OWNER=ory
ARG VERSION=v1.0.0
ARG VERSION=v1.1.0

RUN addgroup --system ory; \
adduser --system ory --no-create-home --disabled-password --ingroup ory --disabled-login

RUN apt-get update && apt-get upgrade -y && apt-get install -y git gcc bash
RUN mkdir -p /var/lib/sqlite

RUN addgroup -S ory; \
adduser -S ory -G ory -D -H -s /bin/nologin
RUN apk -U --no-cache add build-base git gcc bash

RUN mkdir -p /go/src/github.com/$OWNER
WORKDIR /go/src/github.com/$OWNER
Expand All @@ -23,9 +26,11 @@ RUN git checkout $VERSION

ENV GO111MODULE on
ENV CGO_ENABLED 1
ENV CGO_CPPFLAGS -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600

RUN go mod download
RUN go build -tags sqlite -a
RUN go build -tags sqlite -ldflags="-X 'github.com/ory/kratos/driver/config.Version=${VERSION}' -X 'github.com/ory/kratos/driver/config.Date=$(date -I)' -X 'github.com/ory/kratos/driver/config.Commit=$(git rev-parse --short HEAD)'"


FROM ghcr.io/security-onion-solutions/alpine:latest

Expand Down

0 comments on commit 3d5cd01

Please sign in to comment.