fix creating speacial user _zot
This commit is contained in:
parent
416276a1fc
commit
cf8f9b7fd3
@ -1,5 +1,5 @@
|
|||||||
name: Building zot from binaries with patch for login page
|
name: Building zot from binaries with patch for login page
|
||||||
on: [push]
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
@ -14,7 +14,6 @@ jobs:
|
|||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: |
|
run: |
|
||||||
cd zot
|
|
||||||
podman build --tag alt/zot-wo-auth:$ZOT_VER --build-arg="ZOT_VER=$ZOT_VER" --build-arg="ZUI_VER=$ZUI_VER" .
|
podman build --tag alt/zot-wo-auth:$ZOT_VER --build-arg="ZOT_VER=$ZOT_VER" --build-arg="ZUI_VER=$ZUI_VER" .
|
||||||
env:
|
env:
|
||||||
ZOT_VER: 'v2.0.4'
|
ZOT_VER: 'v2.0.4'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM registry.altlinux.org/alt/alt:latest AS builder
|
FROM registry.altlinux.org/alt/alt:sisyphus AS builder
|
||||||
ARG ZOT_VER=v2.0.4
|
ARG ZOT_VER=v2.0.4
|
||||||
ARG ZUI_VER=commit-09ab447
|
ARG ZUI_VER=commit-09ab447
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ RUN make COMMIT=$ZOT_VER ZUI_BUILD_PATH="/workdir/zot/zui/build" binary cli benc
|
|||||||
RUN export ARCH=$(go env GOARCH); bin/zli-linux-$ARCH completion bash > zli.bash
|
RUN export ARCH=$(go env GOARCH); bin/zli-linux-$ARCH completion bash > zli.bash
|
||||||
RUN export ARCH=$(go env GOARCH); bin/zot-linux-$ARCH completion bash > zot.bash
|
RUN export ARCH=$(go env GOARCH); bin/zot-linux-$ARCH completion bash > zot.bash
|
||||||
|
|
||||||
FROM registry.altlinux.org/alt/alt:latest
|
FROM registry.altlinux.org/alt/alt:sisyphus
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="zot"
|
LABEL org.opencontainers.image.title="zot"
|
||||||
@ -44,8 +44,8 @@ RUN apt-get update && apt-get install -y ca-certificates && \
|
|||||||
rm -f /var/cache/apt/archives/*.rpm \
|
rm -f /var/cache/apt/archives/*.rpm \
|
||||||
/var/cache/apt/*.bin \
|
/var/cache/apt/*.bin \
|
||||||
/var/lib/apt/lists/*.*
|
/var/lib/apt/lists/*.*
|
||||||
RUN groupadd -r -f _zot
|
RUN groupadd -r -f -g 10001 _zot
|
||||||
RUN useradd -r -g _zot -M -d /var/lib/_zot -s /dev/null -c "Zot registry user" _zot
|
RUN useradd -r -g _zot -M -d /var/lib/zot -s /dev/null -c "Zot registry user" -u 10001 _zot
|
||||||
|
|
||||||
USER _zot:_zot
|
USER _zot:_zot
|
||||||
|
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
diff --git a/src/App.js b/src/App.js
|
|
||||||
index 6fdd96c..9728bc2 100644
|
|
||||||
--- a/src/App.js
|
|
||||||
+++ b/src/App.js
|
|
||||||
@@ -1,8 +1,7 @@
|
|
||||||
-import React, { useState } from 'react';
|
|
||||||
+import React from 'react';
|
|
||||||
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
|
|
||||||
|
|
||||||
-import { isAuthenticated, isApiKeyEnabled } from 'utilities/authUtilities';
|
|
||||||
-import { AuthWrapper } from 'utilities/AuthWrapper';
|
|
||||||
+import { isApiKeyEnabled } from 'utilities/authUtilities';
|
|
||||||
|
|
||||||
import HomePage from './pages/HomePage';
|
|
||||||
import LoginPage from './pages/LoginPage';
|
|
||||||
@@ -14,25 +13,18 @@ import UserManagementPage from 'pages/UserManagementPage';
|
|
||||||
import './App.css';
|
|
||||||
|
|
||||||
function App() {
|
|
||||||
- const [isLoggedIn, setIsLoggedIn] = useState(isAuthenticated());
|
|
||||||
-
|
|
||||||
return (
|
|
||||||
<div className="App" data-testid="app-container">
|
|
||||||
<Router>
|
|
||||||
<Routes>
|
|
||||||
- <Route element={<AuthWrapper isLoggedIn={isLoggedIn} hasHeader redirect="/login" />}>
|
|
||||||
- <Route path="/" element={<Navigate to="/home" />} />
|
|
||||||
- <Route path="/home" element={<HomePage />} />
|
|
||||||
- <Route path="/explore" element={<ExplorePage />} />
|
|
||||||
- <Route path="/image/:name" element={<RepoPage />} />
|
|
||||||
- <Route path="/image/:reponame/tag/:tag" element={<TagPage />} />
|
|
||||||
- {isApiKeyEnabled() && <Route path="/user/apikey" element={<UserManagementPage />} />}
|
|
||||||
- <Route path="*" element={<Navigate to="/home" />} />
|
|
||||||
- </Route>
|
|
||||||
- <Route element={<AuthWrapper isLoggedIn={!isLoggedIn} redirect="/" />}>
|
|
||||||
- <Route path="/login" element={<LoginPage isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} />} />
|
|
||||||
- <Route path="*" element={<Navigate to="/login" />} />
|
|
||||||
- </Route>
|
|
||||||
+ <Route path="/" element={<Navigate to="/home" />} />
|
|
||||||
+ <Route path="/home" element={<HomePage />} />
|
|
||||||
+ <Route path="/login" element={<LoginPage />} />
|
|
||||||
+ <Route path="/explore" element={<ExplorePage />} />
|
|
||||||
+ <Route path="/image/:name" element={<RepoPage />} />
|
|
||||||
+ <Route path="/image/:reponame/tag/:tag" element={<TagPage />} />
|
|
||||||
+ {isApiKeyEnabled() && <Route path="/user/apikey" element={<UserManagementPage />} />}
|
|
||||||
+ <Route path="*" element={<Navigate to="/home" />} />
|
|
||||||
</Routes>
|
|
||||||
</Router>
|
|
||||||
</div>
|
|
Loading…
Reference in New Issue
Block a user