-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (27 loc) · 761 Bytes
/
Dockerfile
File metadata and controls
34 lines (27 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ubuntu:25.04
# Install necessary packages
RUN apt-get update && apt-get install -y \
build-essential \
libpam0g-dev \
golang \
sudo \
neovim \
pamtester \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create test user
RUN useradd -m testuser && \
echo "testuser:password" | chpasswd && \
usermod -aG sudo testuser
# Set up working directory
WORKDIR /sudoku
# Copy project files
COPY . .
# Build and install the PAM module
RUN make build && \
make install
# Add a test script to verify functionality
RUN echo '#!/bin/bash\necho "Try running: sudo -u testuser sudo ls"\necho "This should trigger the sudoku authentication"' > /test.sh && \
chmod +x /test.sh
# Start with a shell
CMD ["/bin/bash"]