-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathContainerfile
More file actions
48 lines (37 loc) · 1.07 KB
/
Containerfile
File metadata and controls
48 lines (37 loc) · 1.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM fedora:latest
RUN dnf update -y && \
dnf install -y \
podman \
fuse-overlayfs \
podman-compose \
jq \
ShellCheck \
which \
python-flake8 \
python-virtualenv \
python-pip \
socat \
git \
git-email
# needed because for some reason newuidmap and newgidmap programs
# lose their xattrs giving them caps when the container image for
# fedora is created, without this, we see the following output:
# $ rpm -V shadow-utils
# ........P /usr/bin/newgidmap
# ........P /usr/bin/newuidmap
RUN rpm --setcaps shadow-utils
RUN useradd podman; \
echo podman:10000:5000 > /etc/subuid; \
echo podman:10000:5000 > /etc/subgid;
RUN sed -i 's/log_driver = "journald"/log_driver = "json-file"/' /usr/share/containers/containers.conf && \
mkdir /run/storage && \
mkdir -p /home/podman/.local/share/containers && \
ln -s /run/storage /home/podman/.local/share/containers/storage && \
:
WORKDIR /home/podman
COPY --from=singularity_git_repo . ./singularity
COPY start.sh .
RUN chown -R podman:podman ./singularity
USER podman:podman
WORKDIR singularity
ENTRYPOINT ["./start.sh"]