diff --git a/nomad/Dockerfile b/nomad/Dockerfile index bce2c404692513a4badc799fe0fa1e616a5a836b..b379721916dc485f3f1315a8afe3aab515408322 100644 --- a/nomad/Dockerfile +++ b/nomad/Dockerfile @@ -1,6 +1,7 @@ FROM ghcr.io/jumppad-labs/dind:v1.1.2 ARG NOMAD_VERSION +ARG CONSUL_VERSION ARG TARGETARCH ENV CNI_PLUGINS=1.5.1 @@ -16,6 +17,12 @@ RUN curl -L https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_ chmod +x /usr/bin/nomad && \ rm /tmp/nomad.zip +RUN curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_${TARGETARCH}.zip -o /tmp/consul.zip && \ + cd /tmp && \ + unzip consul.zip consul -d /usr/bin && \ + chmod +x /usr/bin/consul && \ + rm /tmp/consul.zip + # Install the CNI Plugins RUN curl -L https://github.com/containernetworking/plugins/releases/download/v${CNI_PLUGINS}/cni-plugins-linux-${TARGETARCH}-v${CNI_PLUGINS}.tgz -o /tmp/cni.tgz && \ mkdir -p /opt/cni/bin && \ diff --git a/nomad/files/nomad.sh b/nomad/files/nomad.sh index 2a6c8ff2c118a0064acd5e38478e2efa945fb0d2..3024d507bc18348f412ae503e6ce58a84ffac4e2 100644 --- a/nomad/files/nomad.sh +++ b/nomad/files/nomad.sh @@ -13,6 +13,9 @@ fi # Start the docker daemon /usr/local/bin/dockerd.sh & +# Start the consul agent +/usr/bin/consul agent -config /etc/consul.d -log-level=DEBUG & + # Start the nomad agent /usr/bin/nomad agent -config /etc/nomad.d -log-level=DEBUG &