Content-Length: 303604 | pFad | https://github.com/sebadob/rauthy/commit/1a7e79dc96d27d8d180d1e4394644c8851cbdf70

7E default to scratch image · sebadob/rauthy@1a7e79d · GitHub
Skip to content

Commit

Permalink
default to scratch image
Browse files Browse the repository at this point in the history
  • Loading branch information
sd committed Jul 5, 2023
1 parent f1d16d7 commit 1a7e79d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 40 deletions.
41 changes: 1 addition & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,17 @@ COPY Cargo.* ./

RUN mkdir data

#RUN cargo build --release --target x86_64-unknown-linux-musl
#RUN cargo build --release

#RUN chown 10001:10001 -R /work

#FROM node:alpine as builderFrontend
#
#WORKDIR /work
#
#COPY frontend/package* ./
#RUN npm install
#
#COPY frontend/ ./
#RUN ./node_modules/.bin/next build && \
# ./node_modules/.bin/next export

FROM alpine:3.18.2
#FROM gcr.io/distroless/cc:debug
#FROM gcr.io/distroless/cc

#RUN apt update && apt install -y gcc ca-certificates && \
# ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime && dpkg-reconfigure -f noninteractive tzdata && \
# apt -y clean
FROM scratch

USER 10001:10001

#COPY --from=builderBackend /etc/passwd /etc/passwd
#COPY --from=builderBackend /etc/group /etc/group
#COPY --from=builderBackend /usr/local/ssl/bin/c_rehash /usr/local/bin/
#COPY --from=builderBackend /usr/local/ssl/bin/openssl /usr/local/bin/
#COPY --from=builderBackend /usr/local/ssl/lib64/libssl.so /usr/lib/libssl.so.3
#COPY --from=builderBackend /usr/local/ssl/lib64/libcrypto.so /usr/lib/libcrypto.so.3

WORKDIR /app

#RUN mkdir -p static/v1
#
#RUN mkdir migrations
#COPY migrations/ ./migrations/
#COPY --chown=10001:10001 --from=builderBackend /work/target/release/rauthy .
COPY --chown=10001:10001 /out/rauthy .
COPY --chown=10001:10001 --from=builderBackend /work/data ./data

COPY --chown=10001:10001 tls/ ./tls/
#COPY --chown=10001:10001 static/ ./static/
#COPY migrations/ ./migrations/
COPY --chown=10001:10001 rauthy.deploy.cfg ./rauthy.cfg

#RUN chown 10001:10001 -R /app

#ENTRYPOINT ["/app/rauthy"]
#ENTRYPOINT [""]
CMD ["/app/rauthy"]
32 changes: 32 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM rust:1.70-alpine3.18 AS builderBackend

WORKDIR /work

COPY migrations/ ./migrations/
COPY rauthy-common/ ./rauthy-common/
COPY rauthy-handlers/ ./rauthy-handlers/
COPY rauthy-main/ ./rauthy-main/
COPY rauthy-models/ ./rauthy-models/
COPY rauthy-service/ ./rauthy-service/
COPY static ./static/
COPY templates ./templates/
COPY Cargo.* ./

RUN mkdir data

FROM alpine:3.18.2
#FROM gcr.io/distroless/cc:debug
#FROM gcr.io/distroless/cc

USER 10001:10001

WORKDIR /app

#COPY --chown=10001:10001 --from=builderBackend /work/target/release/rauthy .
COPY --chown=10001:10001 /out/rauthy .
COPY --chown=10001:10001 --from=builderBackend /work/data ./data

COPY --chown=10001:10001 tls/ ./tls/
COPY --chown=10001:10001 rauthy.deploy.cfg ./rauthy.cfg

CMD ["/app/rauthy"]
6 changes: 6 additions & 0 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ cp target/x86_64-unknown-linux-musl/release/rauthy out/
# registry.netitservices.com is an internal development registry
docker build --no-cache -t registry.netitservices.com/sd/rauthy:$TAG .
docker push registry.netitservices.com/sd/rauthy:$TAG
docker build --no-cache -f Dockerfile.debug -t registry.netitservices.com/sd/rauthy:$TAG-debug .
docker push registry.netitservices.com/sd/rauthy:$TAG-debug

# tagged public release
docker tag registry.netitservices.com/sd/rauthy:$TAG sdobedev/rauthy:$TAG
docker push sdobedev/rauthy:$TAG
docker tag registry.netitservices.com/sd/rauthy:$TAG-debug sdobedev/rauthy:$TAG-debug
docker push sdobedev/rauthy:$TAG-debug

# latest public release
docker tag registry.netitservices.com/sd/rauthy:$TAG sdobedev/rauthy:latest
docker push sdobedev/rauthy:latest

0 comments on commit 1a7e79d

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/1a7e79dc96d27d8d180d1e4394644c8851cbdf70

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy