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
Run docker inside docker to avoid installing multiple dependencies
I'm in front of one dilemma that I'd like to discuss here to open a constructive discussion.
My use case is very simple:
I need to run a bash script which execute several commands like install
aws-cliand query PostgreSQL. For this last task I use
psql. Easy task I'd say however Docker slightly complicate the situation.
The problem would be solved if I would create an image where I'd install all the dependencies. However the result would be a pretty big image and I'd not go with this solution.
What about to run the script with one Docker image and then from the script (inside Docker) run something like
docker run postgres:9.6.3-alpine psql
docker run node:9.8 npm
In other words would be to run docker inside docker. What do you think?
Dot and colon meaning
What does dot-colon
mean in situation like this:
version: '3' services: php: image: php:7.1-fpm ports: - 9000 volumes: - .:/var/www/project:cached
Is this part of bash syntax or is it part of Docker syntax (haven't found any info on both).
Angular app + NGINX + Docker
I have problem with serving Angular app using nginx on docker. Problem is only when I want to turn on SSL on site. I'm using Bamboo for deployment.
Here is my Dockerfile:
FROM node:8.6 as node WORKDIR /app COPY package.json /app/ COPY ssl/certificate.crt /app/ COPY ssl/ /app/ssl RUN npm install -g @angular/cli --unsafe RUN npm install COPY ./ /app/ RUN ng build --prod --aot=false --env=prod FROM nginx RUN mkdir -p /ssl COPY --from=node /app/ssl/ /ssl/ ADD ssl/certificate.crt /etc/nginx/certs/ ADD ssl/private.key /etc/nginx/certs/ RUN ls /etc/nginx/certs/ COPY --from=node /app/dist/ /usr/share/nginx/html RUN ls /usr/share/nginx/html
Script to run:
docker build -t test-app . docker run --name test-app-cont -v /etc/nginx/certs:/etc/nginx/certs -d -p 3010:443 test-app
Deployment runs successfully, but there is no app on server served.
Please have a look at this screen: There is listed what is in /certs and /html directories. Everything seems to be good.
If I remove these lines dedicated to SSL, everything works fine, and on server I can see my app, but only through http.
The certificates are valid, I checked.
What am I doing wrong?