|
1 |
| -FROM registry.fedoraproject.org/fedora:34 |
| 1 | +FROM quay.io/samba.org/sambacc:latest AS builder |
| 2 | +ARG SAMBACC_VER=master |
| 3 | +ARG SAMBACC_REPO=https://github.com/samba-in-kubernetes/sambacc |
| 4 | + |
| 5 | +# The SAMBACC_VER value controls what version of sambacc we'll be building. |
| 6 | +# This can be a branch name, a tag, or a version hash. When building tagged |
| 7 | +# versions of samba-containers we should use a sambacc tag. |
| 8 | +# SAMBACC_DISTNAME controls where the script will output a built wheel. |
| 9 | +RUN SAMBACC_DISTNAME=latest \ |
| 10 | + /usr/local/bin/build.sh ${SAMBACC_VER} ${SAMBACC_REPO} |
2 | 11 |
|
| 12 | +FROM registry.fedoraproject.org/fedora:34 |
3 | 13 | ARG INSTALL_PACKAGES_FROM=default
|
4 | 14 | ARG SAMBA_SPECIFICS=
|
5 | 15 |
|
| 16 | +MAINTAINER John Mulligan < [email protected]> |
| 17 | + |
6 | 18 | COPY install-packages.sh /usr/local/bin/install-packages.sh
|
7 | 19 | RUN /usr/local/bin/install-packages.sh "$INSTALL_PACKAGES_FROM"
|
8 | 20 |
|
9 |
| -COPY provision.sh /usr/local/bin/provision.sh |
10 |
| -COPY run.sh /usr/local/bin/run.sh |
11 |
| -COPY populate.sh /usr/local/bin/populate.sh |
| 21 | +COPY --from=builder \ |
| 22 | + /srv/dist/latest/sambacc-*.whl \ |
| 23 | + /tmp/ |
| 24 | +COPY install-sambacc.sh /usr/local/bin/install-sambacc.sh |
| 25 | +RUN /usr/local/bin/install-sambacc.sh \ |
| 26 | + "/tmp" "/usr/local/share/sambacc/examples/addc.json" |
| 27 | + |
| 28 | + |
| 29 | +ENV SAMBACC_CONFIG="/etc/samba/container.json:/etc/samba/users.json" |
| 30 | +ENV SAMBA_CONTAINER_ID="demo" |
| 31 | +ENV SAMBA_SPECIFICS="$SAMBA_SPECIFICS" |
| 32 | +ENTRYPOINT ["samba-dc-container"] |
| 33 | +CMD ["run", "--setup=provision", "--setup=populate"] |
12 | 34 |
|
13 |
| -ENV POPULATE=/usr/local/bin/populate.sh |
14 |
| -ENTRYPOINT ["/usr/local/bin/run.sh"] |
| 35 | +# vim:set syntax=dockerfile: |
0 commit comments