fix: permission denied
This commit is contained in:
parent
f52450f4c1
commit
43ed0fd3f4
@ -33,4 +33,8 @@ COPY --from=builder /builder/config.docker.yaml /app
|
||||
COPY --from=builder /builder/docker-entrypoint.sh /app
|
||||
COPY --from=builder /builder/woj /app
|
||||
|
||||
# switch user
|
||||
RUN chown -R podman:podman /app
|
||||
USER podman
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
|
@ -61,9 +61,10 @@ for test_num in $(seq "$Info_Num"); do
|
||||
--memory_limit=$Info_Limit_Memory \
|
||||
--nproc_limit=$Info_Limit_NProc \
|
||||
--time_limit=$Info_Limit_Time \
|
||||
--sandbox_path=/woj/framework/scripts/libwoj_sandbox.so \
|
||||
--sandbox_template=$3 \
|
||||
--sandbox_action=ret \
|
||||
--uid=1000 \
|
||||
--gid=1000 \
|
||||
--file_input=/woj/problem/data/input/$test_num.input \
|
||||
--file_output=/woj/user/$test_num.out.usr \
|
||||
--file_info=/woj/user/$test_num.info \
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM docker.io/library/ubuntu:22.04
|
||||
WORKDIR /woj/
|
||||
WORKDIR /woj
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y gcc g++ clang make cmake autoconf m4 libtool gperf git parallel python3 wget && apt-get clean && rm -rf /var/lib/apt/lists
|
||||
@ -20,5 +20,3 @@ ENV TEMPLATE=/woj/framework/template
|
||||
ENV TESTLIB=/woj/framework/template/testlib
|
||||
ENV PREFIX=/woj/problem
|
||||
|
||||
# Permission
|
||||
USER 1000:1000
|
||||
|
@ -1,10 +1,11 @@
|
||||
FROM woj/ubuntu-full:latest AS builder
|
||||
FROM docker.io/library/ubuntu:22.04
|
||||
|
||||
WORKDIR /woj/problem
|
||||
WORKDIR /woj
|
||||
RUN mkdir -p /woj/framework/scripts
|
||||
|
||||
COPY --from=builder /woj/framework/scripts/woj_launcher /woj/framework/scripts/
|
||||
|
||||
# Permission
|
||||
USER 1000:1000
|
||||
# Add User
|
||||
RUN groupadd -g 1000 woj && useradd -M -u 1000 -g 1000 woj
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user