From cf8f9b7fd3a441b7129563ff4d461eb180a6b1f1 Mon Sep 17 00:00:00 2001 From: Nadezhda Fedorova Date: Fri, 24 May 2024 18:10:21 +0300 Subject: [PATCH] fix creating speacial user _zot --- .gitea/workflows/patchbuild.yaml | 3 +- Dockerfile | 8 +++--- zui-auth2.patch | 49 -------------------------------- 3 files changed, 5 insertions(+), 55 deletions(-) delete mode 100755 zui-auth2.patch diff --git a/.gitea/workflows/patchbuild.yaml b/.gitea/workflows/patchbuild.yaml index 122cd5e8..ece0bf6f 100755 --- a/.gitea/workflows/patchbuild.yaml +++ b/.gitea/workflows/patchbuild.yaml @@ -1,5 +1,5 @@ name: Building zot from binaries with patch for login page -on: [push] +on: push jobs: build-process: @@ -14,7 +14,6 @@ jobs: uses: actions/checkout@master - name: Build image run: | - cd zot podman build --tag alt/zot-wo-auth:$ZOT_VER --build-arg="ZOT_VER=$ZOT_VER" --build-arg="ZUI_VER=$ZUI_VER" . env: ZOT_VER: 'v2.0.4' diff --git a/Dockerfile b/Dockerfile index 17a71ab1..06af3a55 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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 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/zot-linux-$ARCH completion bash > zot.bash -FROM registry.altlinux.org/alt/alt:latest +FROM registry.altlinux.org/alt/alt:sisyphus MAINTAINER alt-cloud 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 \ /var/cache/apt/*.bin \ /var/lib/apt/lists/*.* -RUN groupadd -r -f _zot -RUN useradd -r -g _zot -M -d /var/lib/_zot -s /dev/null -c "Zot registry user" _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" -u 10001 _zot USER _zot:_zot diff --git a/zui-auth2.patch b/zui-auth2.patch deleted file mode 100755 index 46b4e836..00000000 --- a/zui-auth2.patch +++ /dev/null @@ -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 ( -
- - -- }> -- } /> -- } /> -- } /> -- } /> -- } /> -- {isApiKeyEnabled() && } />} -- } /> -- -- }> -- } /> -- } /> -- -+ } /> -+ } /> -+ } /> -+ } /> -+ } /> -+ } /> -+ {isApiKeyEnabled() && } />} -+ } /> - - -