-
Alex de Cock Buning authored
This commit introduces a new bash script, build_and_push_images.sh, which automates the process of building and pushing Docker images for l2sm-switch, l2sm-controller, and l2sm-operator. This script simplifies the image creation and push workflow, providing options for building images, pushing images, or both.
Alex de Cock Buning authoredThis commit introduces a new bash script, build_and_push_images.sh, which automates the process of building and pushing Docker images for l2sm-switch, l2sm-controller, and l2sm-operator. This script simplifies the image creation and push workflow, providing options for building images, pushing images, or both.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Dockerfile 681 B
FROM golang:1.20 AS build
WORKDIR /usr/src/l2sm-switch
COPY ./src/switch/ ./build/switch/build-go.sh ./
RUN chmod +x ./build-go.sh && ./build-go.sh
FROM ubuntu:latest
WORKDIR /usr/local/bin
COPY ./src/switch/vswitch.ovsschema /tmp/
COPY --from=build /usr/local/bin/ .
RUN apt-get update && \
apt-get install -y net-tools iproute2 netcat-openbsd dnsutils curl iputils-ping iptables nmap tcpdump openvswitch-switch && \
mkdir /var/run/openvswitch && mkdir -p /etc/openvswitch && ovsdb-tool create /etc/openvswitch/conf.db /tmp/vswitch.ovsschema
COPY ./src/switch/setup_switch.sh .
RUN chmod +x ./setup_switch.sh && \
mkdir /etc/l2sm/
CMD [ "./setup_switch.sh" ]