Placing network restrictions with docker
Is it possible using a docker instance to place restrictions on a network. i.e. certain websites being restricted when using a sandbox browser?
See also questions close to this topic
Docker-CE or docker on CentOS
I have a group of CentOS 7 machines that I had previously installed 'docker'; however, I'm finding that there's a repo with newer versions for CentOS with the docker repo added: 'docker-ce'.
Name : docker Arch : x86_64 Epoch : 2 Version : 1.12.6 Release : 68.gitec8512b.el7.centos Size : 15 M Repo : extras/7/x86_64
versus Name : docker-ce Arch : x86_64 Version : 17.12.0.ce Release : 1.el7.centos Size : 123 M Repo : installed From repo : docker-ce-stable
Which would be the preferred version to run? Newer is better or is the package that ships with CentOS extras the best? So OS vendor or software vendor?
how to run docker image with parameters with entrypoint
I have this docker file and I would like that when I do a docker run, the container starts and execute a test from a ".jar" file that is on a directory with a parameter at the end like this:
java -jar /opt/sqa/QA.jar PARAMETER
This is a dockerfile example whit what I have:
FROM openjdk:8-jre WORKDIR /opt/sqa/ ENTRYPOINT ["java -jar /opt/sqa/QA.jar","$@"]
But I can make it work when I run:
docker run -it Image:Automation PARAMETER
the JAR is already on that directory (mapped with -V on Docker run). In fact if I access the container and i run the test manually it works, but is not the idea.
I would like to be able to change the PARAMETER at the moment of running the container Instead of PARAMETER, PARAMETER2, or TEST1, TEST2 and whatever I want. Is this possible doing it with entrypoint like i did here? what should I change?
ENTRYPOINT ["java -jar /opt/sqa/QA.jar","$@"]
I'm getting error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"java -jar /opt/sqa/QA.jar\": stat java no such file or directory": unknown.
Live reload Angular4 app in Docker container?
We are deploying our production Angular4 webapp in a Docker container. Our Dockerfile looks like this:
FROM alpine RUN apk add --update python \ python-dev \ py-pip \ nodejs \ nodejs-npm \ openssl \ nginx RUN pip install jinja2 RUN npm -g config set user root RUN npm install -g @angular/cli RUN mkdir /app ADD web /tmpbuild WORKDIR /tmpbuild RUN npm install RUN ng build --env=prod RUN mkdir /app/html RUN cp -R dist/* /app/html/ RUN rm -rf /tmpbuild ADD app /app WORKDIR /app RUN chmod 755 start.sh ENTRYPOINT /app/start.sh
Because we want our development environment to match our production environment, we are also containerizing our webapp locally, using this same Dockerfile. The question is - how do we keep the files compiled in development consistent with those in our production container, while also live-reloading? If we used
ng serveinstead of
ng build --env=prodin the Dockerfile for development, then the live reloading would work as expected. But running
ng buildmay fail when
ng servedoesn't (for instance, using aot compilation prohibits the use of private variables in certain cases with
ng buildbut not with
ng serve), which is why we need the commands to be consistent between development and production.
Is there another recommended approach to achieve live-reloading with