Jenkins Docker image says insufficient memory for JRE to continue, but server should have more than enough?

So I’m trying to mount a CI with Jenkins on an “old” laptop I had here which has 16GB RAM. I installed Alpine Linux 3.6 on an SSD and installed Docker.

Now I’m trying to run the official Jenkins Docker image with this command:

docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts

but I get this error:

docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000605179000000, 2555904, 1) failed; error='Operation not permitted' (errno=1)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid7.log

I should have more than enough memory for that? Maybe I installed Alpine Linux in a wrong manner?

Some more info:

free -m
             total       used       free     shared    buffers     cached
Mem:         15946       1357      14588          0         30       1077
-/+ buffers/cache:        249      15696
Swap:         4095          0       4095

cat /proc/meminfo
MemTotal:       16328748 kB
MemFree:        14938800 kB
MemAvailable:   15872176 kB
Buffers:           31668 kB
Cached:          1102936 kB
SwapCached:            0 kB
Active:           169240 kB
Inactive:        1025368 kB
Active(anon):      60072 kB
Inactive(anon):      180 kB
Active(file):     109168 kB
Inactive(file):  1025188 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4194300 kB
SwapFree:        4194300 kB
Dirty:                32 kB
Writeback:             0 kB
AnonPages:         44952 kB
Mapped:            38048 kB
Shmem:               248 kB
Slab:             132372 kB
SReclaimable:     103496 kB
SUnreclaim:        28876 kB
KernelStack:        3456 kB
PageTables:          944 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12358672 kB
Committed_AS:      76100 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
AnonHugePages:      2048 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       17232 kB
DirectMap2M:     3047424 kB
DirectMap1G:    13631488 kB

dmesg| grep "Memory"
[    0.000000] Memory: 16314720K/16695744K available (6602K kernel code, 2607K rwdata, 1984K rodata, 1260K init, 712K bss, 381024K reserved, 0K cma-reserved)
[    3.494869] [drm] Memory usable by graphics device = 2048M

Sorry if this doesn’t belong in this forum!

Thanks for the help!

I am running into exactly same problem.
Have you found the solution to that issue?

Take a look at -Xmn value in the XML file