Docker

Docker is a computer program used to run software packages called containers in an operating-system-level virtualization process called containerization. It’s developed by Docker, Inc. and was first released in 2013.

Share tech news, updates, or what's on your mind.

Sign up to Post

Architecture advice

So from a full pipeline infrastructure to develop and then deploy a web application what would you all recommend as best practice.

The items I do know at this point is I will be using the latest .net and angular frameworks for the application.  There will be a SQL backend.

My company wants this application to be deployed using CI/CD techniques.

We will have an Azure storage along with utilizing Docker.

I dont know much more but wanted to get an idea of what this architecture should look like as a developer.

I would imagine working locally in visual studio...perhaps there are some item you need to think about upfront for .net and angular apps while developing knowing that you will push to azure via a docker container.

Also at this point should I be thinking about .net versus .net core.

I plan on watching some videos and doing more reading but wanted to start with this as a place to get ideas of how this should be setup at a high level
from the architecture point of view dev through test and prod.
0
Ensure Business Longevity with As-A-Service
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Hello,
How to install a docker for Microservices. I tried to install it on my home laptop but it failed as it requires Windows 10 pro.

Regards
0
I need to be a quick study in Docker

I am trying to digest Azure, Containers, Docker, Kubernetes, etc.

and quickly.

I am rebuilding my Mac OS environment to contain:

- a Windows 10 VM on Parallels
- a LINUX VM on Parallels
- Visual Studio 2019 Community Edition
- access to Azure Cloud

So, My first hands on practice could be to learn about Docker.

What kind of work-along tutorial can you suggest?  Or video training?

Thanks
0
I have a server that has 32GB of RAM and 8TB of HDD with RAID 1 for 4TB of total HDD space.

I would like to split that with 2 TB being NFS and 2TB being Samba.

This is sort of a discussion oriented question.

I was wondering about running NFS and Samba under LXD or Docker containers. Would there be advantages to doing this (at least for learning)?
0
Hi Experts,

I get the following error as below for wagtail (Django application) inside a Docker container.  Please see the uwsgi logs inside the docker container as below.


*** Starting uWSGI 2.0.18 (64bit) on [Mon Mar  4 03:56:36 2019] ***
compiled with version: 5.4.0 20160609 on 04 March 2019 01:00:36
os: Linux-4.4.0-1057-aws #66-Ubuntu SMP Thu May 3 12:49:47 UTC 2018
nodename: e56d42de8c73
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/ntdl/code
writing pidfile to /tmp/ntdl.pid
detected binary path: /usr/local/bin/uwsgi
setgid() to 33
setuid() to 33
chdir() to /home/ntdl/code
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/ntdl.sock fd 8
uwsgi socket 1 inherited UNIX address @ fd 0
inherit fd0: chmod(): No such file or directory [core/socket.c line 1797]
Python version: 3.6.2 (default, Jul 17 2017, 23:14:31)  [GCC 5.4.0 20160609]
Python main interpreter initialized at 0x971510
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 543168 bytes (530 KB) for 20 cores
*** Operational MODE: threaded ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x971510 pid: 24 (default app)
*** uWSGI is running in 

Open in new window

0
Hi Experts,

I get the following error when I run the docker

root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/NTDL-TEST/Harvest-Trove-Pictures# sudo docker start trove_pull
Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"start\\\": executable file not found in $PATH\"\n"
Error: failed to start containers: trove_pull

Open in new window


the docker file contents are as follows

FROM ubuntu:16.04

MAINTAINER bharath-ak@nt.gov.au

RUN apt-get update -y
RUN apt-get install -y software-properties-common python-software-properties curl
RUN add-apt-repository -y ppa:fkrull/deadsnakes

RUN apt-get update -y && apt-get install -y curl
RUN apt-get update -y && apt-get install -y \
        git \
        python3.6 \
        python3.6-dev \
        nginx \
        sqlite3 \
        nodejs \
        build-essential \
        libmagickwand-dev \
        cron \
        nginx \
        python3-pip

RUN rm -f /usr/bin/python3
RUN ln -s /usr/bin/python3.6 /usr/bin/python3
#RUN curl https://bootstrap.pypa.io/get-pip.py | python3


RUN mkdir -p /home/trove/trove
WORKDIR /home/trove


COPY . .
COPY ./ ./
RUN chmod -R 755 /home/trove
RUN chown -R www-data:www-data /home/trove
COPY . .

COPY build/docker/uwsgi_params .
COPY build/docker/uwsgi.ini .
COPY trove-variables.env .
RUN pip3 install --no-cache-dir uwsgi
RUN pip3 install --no-cache-dir -r requirements.txt

COPY build/docker/start 

Open in new window

0
Hi Experts,

I get the following error for python application.

django.db.utils.OperationalError: FATAL:  remaining connection slots are reserved for non-replication superuser connections

Open in new window


I use dj_database_url.py for configuring database.   I am using Postgres as a database

I had set connection_max_age to 0 in the config. dj_database_url.py

Still, I get this error.

I had checked the entire source code by using grep there is no connection in the source code.

I getting this error from inside docker container.  the database is outside the docker container.

the connection string I use to connect is DATABASE=postgres://test:*****@172.17.0.1/test where 172.17.0.1 is docker gateway.

max_connection =100 in postgresql.conf which located inside /etc/postgresql/9.5/main/

Any help is greatly appreciated.
0
Hi Experts,

I get a bad gateway when running the web application from docker.

I had installed nginx inside the docker container.

for eg,

docker gateway is 1.2.3.4

public ip is 4.3.2.1

I create the environment for the docker container

declare -a ntdl_environment=( -e ES_CONNECTION=1.2.3.4:9200 -e DATABASE=postgres://user:****@1.2.3.4/ntdl -e LOCAL_URL_PREFIX==https://ntest-dev.s3.amazonaws.com -e IIIF_SERVER=http://4.3.2.1/iiif -e FACEBOOK_APP_ID=000000 -e CLOUD_WATCH=true -e AWS_ACCESS_KEY_ID=akz44 -e AWS_SECRET_ACCESS_KEY=******** -e AWS_DEFAULT_REGION=ap-abct-2 -e S3_BUCKET=abc-test-dev -e GENERIC_SERVER_NAME=http://4.3.2.1 -e SEARCH_PATH=/ -e SEARCH_DOMAIN=http://4.3.2.1 -e HANDLE_SITEMAP_PATH=https://s3-test.amazonaws.com/ntest/sitemap/sitemap.txt.gz -e DEBUG=true)

Open in new window


I had run the following commands to run the docker container

docker run --name ntdl -d --restart always  ${ntdl_environment[@]} f27af16c9ed6

to go inside bash shell for the docker container i had run the follow command from command prompt

docker exec -it ntdl /bin/bash

when I run gateway ip for elasticsearch it is running fine inside docker
I get the following results it is working fine

root@16a1d7df5399:/home/ntdl/code# curl -XGET 1.2.3.4:9200
{
  "name" : "C****D",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "FG4Sgll3Rau***6nQ",
  "version" : {
    "number" : "5.6.4",
    "build_hash" : "8bbedf5",
    "build_date" : "2017-10-31T18:55:38.105Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.1"
  },
  "tagline" : "You Know, for Search"
}

I had checked nginx status inside docker it is working fine.

root@16a1d7df5399:/home/ntdl/code# service nginx status
 * nginx is running

curl -XGET 'localhost' inside the docker gets the following below error


Open in new window

0
Background

I have installed Docker EE on a new copy of Windows 2016 using the following PowerShell commands as recommended in the Docker page (click here):
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force

Open in new window


Problem

Docker appears to have installed correctly (the 'Program Files' folder has been created, the service has been created and the basic 'Hello World' test was successful) but the service will not automatically start with Windows.

Keep in mind:
  • The service startup type is definitely set to 'Automatic'.
  • There is no error recorded in the Windows Event Logs.
  • One started the service stays running without generating any errors in the event log.

Question

Has anyone had the same issue ?
Can anyone suggest what the issue is because I can find nothing via the web ?
0
I have a java backend application which is containerised using docker. The front end for this application is developed using npm and these static files are deployed in nginx. And it works perfectly. The api calls to the backed is proxy passed to the docker host using nginx reverse proxy.




Now i need to setup docker swarm for this backend application using manager and worker nodes.


So these are the questions which I need to ask you experts,

To which host should I need to configure proxy pass in nginx while using docker swarm?


Thanks in advance :)
0
Amazon Web Services
LVL 13
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Following command Not returning any IP address it just returns an empty string

docker inspect --format '{{.NetworkSettings.Networks.nat.IPAddress}}' sql2
empty.PNG
0
What is the location of  the binary and library postgresql directories installed on docker linux suse 12 sp2 ?
We have this postgres DB installation working ok.
I have access to the database using pgadmin and dbeaver.
But we don't know who did this installation and I need to know the location of the binary and library postgresql directories in order to run pg_ctl and psql.
0
Are there any limitations in Linux containers (LXC/LXC/dockers) with regards to supporting software / os etc, vs with full virtualization software or bare metal?
0
Hi Experts,

I get the following errors with docker compose up

root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/harvest-trove# docker-compose up
Recreating harvest-trove_harvest-trove_1 ... done
Creating harvest-trove_trove_review_1    ...
Creating harvest-trove_trove_pull_1      ... error
Creating harvest-trove_trove_push_1      ...
Creating harvest-trove_trove_process_1   ...

ERROR: for harvest-trove_trove_pull_1  Cannot start service trove_pull: invalid header field value "oci runtime error: container_linux.go:247: starting container procesCreating harvest-trove_trove_process_1   ... error

Creating harvest-trove_trove_push_1      ... error
Creating harvest-trove_trove_review_1    ... error

ERROR: for harvest-trove_trove_push_1  Cannot start service trove_push: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for harvest-trove_trove_review_1  Cannot start service trove_review: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_pull  Cannot start service trove_pull: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_process 

Open in new window

0
how to access s3 bucket in the docker file.

its expecting aws configure , i export the  key's but its does not help for me!!!
0
Hi Experts,

     I had build and run a docker image like this.

docker build -t harvest-trove:1.0.3 .
docker run --name trove_pull ${trove_environment[@]} -d -restart always harvest-trove:1.0.3 start pull                 

Open in new window


I want to use docker compose for the above two commands

I had created the docker compose like this.

version:'3'
services:
   harvest-trove:
      build: .
      image: harvest-trove:1.0.3
      volumes:
                -  .:/home/trove
           env_file:
        -  web-variables.env
            command: python3 manage.py migrate
  trove-pull:
    container_name:trove-pull     
    image: harvest-trove
    env_file:
       - web-variables.env
       depends_on:
         - harvest-trove
       command: harvest-trove:1.0.3 start pull
       restart:always

Open in new window


when I run docker-compose up I get the following error.

error with docker-compose up
Please help me in fixing this issue.

With Many thanks,
Bharath AK
0
How to download awscli docker image  (I try docker run awscli it ask password without that is it possible)

How to download mariaDB docker image  (I try docker run mariaDB it ask password without that is it possible)
0
how to read the csv file which is in AWS s3 bucket

aws s3 cp command will copy the file but i need to validate before copy the file ? is that possible ?
0
Hi Experts,

     docker container is not picking the recent changes from the source code.     it makes me to build the docker image every time to see the latest changes on the source code.

Please find below the contents of the Dockerfile

FROM ubuntu:16.04

MAINTAINER *****

RUN apt-get update -y
RUN apt-get install -y software-properties-common python-software-properties curl
RUN add-apt-repository -y ppa:fkrull/deadsnakes

RUN apt-get update -y && apt-get install -y curl
RUN apt-get update -y && apt-get install -y \
	git \
	python3.6 \
	python3.6-dev \
	nginx \
	sqlite3 \
	nodejs \
	build-essential \
	libmagickwand-dev \
	cron \
	nginx

RUN rm -f /usr/bin/python3
RUN ln -s /usr/bin/python3.6 /usr/bin/python3
RUN curl https://bootstrap.pypa.io/get-pip.py | python3

WORKDIR /home/trove
COPY . .

COPY build/docker/uwsgi_params .
COPY build/docker/uwsgi.ini .
RUN pip3 install --no-cache-dir uwsgi
RUN pip3 install --no-cache-dir -r requirements.txt

COPY build/docker/start /usr/bin/
COPY build/docker/crontab /etc/cron.d/harvest-cron
RUN chmod 0644 /etc/cron.d/harvest-cron
RUN touch /var/log/harvest.log

RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY build/docker/nginx-app.conf /etc/nginx/sites-available/default
COPY build/docker/start /usr/bin/
RUN mkdir /var/log/harvest/
RUN python3 manage.py collectstatic --noinput

WORKDIR /home/trove/
RUN chmod 755 /home/trove
RUN chown -R www-data:www-data /home/trove

EXPOSE 80
CMD ["start"]

Open in new window


please find below the contents of the crontab

SHELL=/bin/bash
* * * * * root ( source /tmp/environment.sh && /usr/bin/python3 /home/trove/run.py $(cat /tmp/method) ) >> /dev/null 2>/var/log/harvest/ts_errors.log

Open in new window

0
Active Protection takes the fight to cryptojacking
LVL 2
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

What are all the package need to access docker to lambda


lambda will call s3 bucket .

I need automated script (that script will daily mid night will run)
0
how we can read s3 bucket files form docker container
what are the package needed and what is the command

how we can put data to maria DB form docker container
what are the package needed and what is the command
0
Hi Experts,

   I got a server which runs applications with docker and aws, running from console(putty).  The command to run is as follows:-

docker run --name ts_pull ${ts_environment[@]}  -d  --restart always 1234656458.dkr.ecr.ap-southeast-2.amazonaws.com/harvest-ts:1.0.2 start pull

Open in new window


I can understand 1234656458.dkr.ecr.ap-southeast-2.amazonaws.com/harvest-ts:1.0.2 is from aws.  Can any tell me how this container application is pushed to aws?

From the documentation I found Dockerfile is available, from which the docker image is built.  I don't understand how to push this to aws and run with the docker.

Please throw some light over it.

with many thanks,

Bharath AK
0
Hi Experts,

   How to delete the existing elasticsearch cluster and how to create a new elasticsearch cluster?  Please throw some best practices.

With Many thanks,

Bharath AK
0
Hi Experts,

      I have two containers running on dockers.  

root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/ntdl# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                  NAMES
596874f0eedb        dcf3be75c970        "start"             8 days ago          Up 8 days           0.0.0.0:8009->80/tcp   iiif
91c61a7ea455        8a38b977270d        "start"             8 days ago          Up 8 days           0.0.0.0:8008->80/tcp   ntdl

Open in new window


wagtail(Django)  (ntdl )application on port 8008
wagtail application similar to django applicationimage server running independently on 8009
IIIF IMAGE Serverwagtail (ntdl) without zoom image not communicating with iif image server
wagtail application not talking to iiif image server
without zoom image from image server
console logs details
console log on browser windowconsole logs
::net ERR_CONNECTION_REFUSED for accessing iiif_image server.  

nginx is installed with wagtail ntdl application
Please help me in resolving this issue.



With many thanks,
Bharath AK
0
How is Docker different from a virtual machine?  How does it manage to provide a full filesystem, isolated networking environment, etc. without being as heavy?
0

Docker

Docker is a computer program used to run software packages called containers in an operating-system-level virtualization process called containerization. It’s developed by Docker, Inc. and was first released in 2013.