Dockerfile:
FROM golang:latest # COPY kube/command.sh . RUN apt-get update # To be able to do go run !(*_test).go RUN apt-get install dnsutils -y # CMD [ "shopt -s extglob" ] CMD [ "sh command.sh" ] # RUN bash -c shopt -s extglob # RUN "sh command.sh" Also tried with a script file(command.sh):
#!/bin/sh shopt -s extglob And RUN bash -c shopt -s extglob
Building Dockerfile I get this:
bash: !: event not found If I run the container and manually doing shopt -s extglob: it works.
Do you know why?