Skip to content

Commit 02f7dd9

Browse files
server: match recent changes to sambacc packaging approach
sambacc now outputs wheels versioned based on the vcs tags and vcs hash etc. as needed. It also now puts builds in a specific "dist dir" under /srv when requested. This change makes the samba-container match the new sambacc behavior. Signed-off-by: John Mulligan <[email protected]>
1 parent 8245875 commit 02f7dd9

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

images/server/Dockerfile.fedora

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
FROM quay.io/samba.org/sambacc:latest AS builder
2-
ARG SAMBACC_VER=fd747527ed86d01821c4a3b72f1c4f893bb1ca36
2+
ARG SAMBACC_VER=master
33
ARG SAMBACC_REPO=https://github.com/samba-in-kubernetes/sambacc
44

55
# the changeset hash on the next line ensures we get a specifc
66
# version of sambacc. When sambacc actually gets tagged, it should
77
# be changed to use the tag.
8-
RUN /usr/local/bin/build.sh ${SAMBACC_VER} ${SAMBACC_REPO}
8+
RUN SAMBACC_DISTNAME=latest \
9+
/usr/local/bin/build.sh ${SAMBACC_VER} ${SAMBACC_REPO}
910

1011
FROM registry.fedoraproject.org/fedora:34
1112

1213
MAINTAINER John Mulligan <[email protected]>
13-
ENV SAMBACC_VERSION="0.1"
1414

1515
COPY smb.conf /etc/samba/smb.conf
1616
RUN dnf install --setopt=install_weak_deps=False -y \
@@ -30,10 +30,13 @@ RUN dnf install --setopt=install_weak_deps=False -y \
3030
&& true
3131

3232
COPY --from=builder \
33-
/var/tmp/build/sambacc/dist/sambacc-$SAMBACC_VERSION-py3-none-any.whl \
34-
/tmp/sambacc-$SAMBACC_VERSION-py3-none-any.whl
35-
RUN pip install /tmp/sambacc-$SAMBACC_VERSION-py3-none-any.whl \
36-
&& rm -f /tmp/sambacc-$SAMBACC_VERSION-py3-none-any.whl \
33+
/srv/dist/latest/sambacc-*.whl \
34+
/tmp/
35+
RUN true \
36+
&& wheel="$(find /tmp/ -type f -name 'sambacc-*.whl')" \
37+
&& [ $(echo "$wheel" | wc -l) = 1 ] \
38+
&& pip install "$wheel" \
39+
&& rm -f "$wheel" \
3740
&& ln -s /usr/local/share/sambacc/examples/minimal.json /etc/samba/container.json \
3841
&& true
3942

0 commit comments

Comments
 (0)