Git Product home page Git Product logo

dockerfiles's Introduction

This repository contains my Dockerfiles

Docker images build ISC

Image builds are triggered automatically each month.

Directory structure

  • aports-dev contains an image for Alpine Linux aports development.
  • openrc and systemd contain init-enabled docker images in which services are able to run.

License

Copyright (c) 2018-2021 Julien Reichardt - ISC License

dockerfiles's People

Contributors

j8r avatar jimeh avatar ottok avatar pgeraghty avatar rnsc avatar skeli789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerfiles's Issues

LLVM Error

Got this error when compiling.

Status: Downloaded newer image for jrei/crystal-alpine:latest
Showing last frame. Use --error-trace for full trace.

In /usr/lib/crystal/core/llvm/lib_llvm.cr:4:19

4 | `[ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" ||
^
Error: error executing command: [ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || command -v llvm-config-8 || command -v llvm-config-8.0 || command -v llvm-config80 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 8.0*) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-7 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 7.1) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-7.0 || command -v llvm-config70 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 7.0) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-6.0 || command -v llvm-config60 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 6.0) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-5.0 || command -v llvm-config50 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 5.0) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-4.0 || command -v llvm-config40 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 4.0) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-3.9 || command -v llvm-config39 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9) command -v llvm-config;; ) false;; esac)) || command -v llvm-config-3.8 || command -v llvm-config38 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8) command -v llvm-config;; *) false;; esac)) || command -v llvm-config

              , got exit status 127

Failed to connect to bus: No such file or directory

root@2a4cf878b7a4:/# systemctl start puppetserver
Failed to connect to bus: No such file or directory
root@2a4cf878b7a4:/# systemctl status puppetserver
Failed to connect to bus: No such file or directory
root@2a4cf878b7a4:/# service puppetserver status

  • puppetserver is not running

Please help, tried in 16.04, 18.04 (Can't use 20.04 as foreman-installer not supported)

MacOS BigSur Docker Volumes issue

Seems there is an issue with Docker volumes syncing on MacOS Big Sur. I was able to resolve it by updating to the latest version of Docker Desktop Edge (Docker Desktop Community 2.5.1.0) and then running apt-get update && apt-get dist-upgrade -y on your 18.04 image.

As soon as Docker releases their fixes to stable, I assume all that would be needed is an update to your image(s).

Thanks for the awesome images!

Fedora systemd docker won't start. (LoL I spoke to soon) ...

Hi Friend:

I've successfully used your Dockerfile before, and it works well. I was tinkering with it today, and for some reason it doesn't launch.

I pasted my session below:

user@fedora-33$ cat Dockerfile
======================================
FROM fedora:latest

ENV container docker

RUN dnf -y update \
    && dnf -y install systemd \
    && dnf clean all

RUN cd /lib/systemd/system/sysinit.target.wants/; \
    for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done

RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
    /etc/systemd/system/*.wants/* \
    /lib/systemd/system/local-fs.target.wants/* \
    /lib/systemd/system/sockets.target.wants/*udev* \
    /lib/systemd/system/sockets.target.wants/*initctl* \
    /lib/systemd/system/basic.target.wants/* \
    /lib/systemd/system/anaconda.target.wants/*

VOLUME [ "/sys/fs/cgroup" ]

CMD ["/usr/sbin/init"]
======================================

user@fedora-33$ docker run -d --name systemd-fedora --tmpfs /tmp \
                   --tmpfs /run --tmpfs /run/lock \
                   -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
                   jrei/systemd-fedora

user@fedora-33$ docker images
REPOSITORY            TAG       IMAGE ID       CREATED       SIZE
jrei/systemd-fedora   latest    30627080674c   6 weeks ago   224MB

user@fedora-33$ docker run -d --name systemd-fedora --tmpfs /tmp \
                   --tmpfs /run --tmpfs /run/lock \
                   -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
                   jrei/systemd-fedora

user@fedora-33$ docker ps -a
CONTAINER ID   IMAGE                 COMMAND            CREATED          STATUS                       PORTS     NAMES
e6715541e20f   jrei/systemd-fedora   "/usr/sbin/init"   10 seconds ago   Exited (255) 9 seconds ago             systemd-fedora

Just FYI (not urgent). ๐Ÿ˜Š

privileged or cap SYS_ADMIN not required

FYI,

I'm able to run the container without any elevated privileges using this:

docker run -d --name systemd --tmpfs /tmp --tmpfs /run \
    --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    jrei/systemd-debian

Seems to be working OK, but maybe I missed something??

Suggested methods don't start containers for debian:10|11|sid

Hi and thanks for your *-systemd stuff ...

I've tried suggested methods (using --privileged, and even adding --cap-add SYS_ADMIN capabilities) but none seems to work for debian:10|debian:11|debian:sid :(

Produces:

systemd-debian-sid   jrei/systemd-debian:sid      4 minutes ago   Exited (255) 4 minutes ago   
systemd-debian-11    jrei/systemd-debian:11       4 minutes ago   Exited (255) 4 minutes ago   
systemd-debian-10    jrei/systemd-debian:10       4 minutes ago   Exited (255) 4 minutes ago   
systemd-debian-9     jrei/systemd-debian:9        4 minutes ago   Up 4 minutes                 
systemd-debian-8     jrei/systemd-debian:8        4 minutes ago   Up 4 minutes

Unable to run container on Ubuntu 18.04

Hi,
I am using your Dockerfile as a baseline for a container that can join to Microsoft Active Directory. the build process finishes without any error.
I am getting the error below when attempting to run the container in privileged mode.
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "/usr/lib/systemd/systemd": stat /usr/lib/systemd/systemd: no such file or directory: unknown

here is the Dockerfile:

FROM ubuntu:18.04
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive

RUN sed -i 's/# deb/deb/g' /etc/apt/sources.list

VOLUME ["/sys/fs/cgroup"]
VOLUME ["/run"]

CMD ["/usr/lib/systemd/systemd"]

RUN apt-get update \
    && apt-get install -y systemd systemd-sysv \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update && apt-get install -y sssd sssd-dbus adcli krb5-user ntp realmd oddjob oddjob-mkhomedir samba-common



RUN cd /lib/systemd/system/sysinit.target.wants/ \
    && ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1

RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
    /etc/systemd/system/*.wants/* \
    /lib/systemd/system/local-fs.target.wants/* \
    /lib/systemd/system/sockets.target.wants/*udev* \
    /lib/systemd/system/sockets.target.wants/*initctl* \
    /lib/systemd/system/basic.target.wants/* \
    /lib/systemd/system/anaconda.target.wants/* \
    /lib/systemd/system/plymouth* \
    /lib/systemd/system/systemd-update-utmp*

RUN mkdir -p /etc/sssd
COPY sssd.conf /etc/sssd/sssd.conf

COPY krb5.keytab /etc/krb5.keytab
COPY krb5.conf /etc/krb5.conf

COPY idmapd.conf /etc/idmapd.conf

COPY resolv.conf /etc/resolv.conf

COPY rc.local /etc/rc.d/rc.local

ADD configure-nfs.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/configure-nfs.sh
RUN chmod +x /etc/rc.d/rc.local

I'd appreciate any guidance you can provide.

Best,
AR

ARM64 restart

hello the arm64 version of both ubuntu and debian are restarting in loop.
is this a bug or i am doing something wrong?
i followed the same thing for AMD64 and the image works there..

jrei/systemd-debian does not work on macOS Monterey (12.0.1)

I used your jrei/systemd-debian downloaded from dockerhub without any issues on Windows 11.
Now I'm trying to install it on maxOS Monterey, but does not start at all.

I tried both the commands:
docker run -d --name systemd-debian --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-debian
docker run -d --name systemd-debian --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-debian
from my user and with user root without success.

From docker events I just see a die that does to tell me much:

2022-01-03T11:16:00.957347893+01:00 container create fc46e6578aa63cdec91ae506904011e1d138b654e9d6a136df9d9f79635a60e3 (image=jrei/systemd-debian, maintainer=j8r, name=systemd-debian, org.opencontainers.image.revision=a54bb365bc93f9f0bb071193bf417d60571eb00b, org.opencontainers.image.vendor=j8r)
2022-01-03T11:16:00.992606391+01:00 network connect dedb2711e72f1bf9c3a5ea30d2aea7e5a78a26f38578b2a85c570cf2ec974761 (container=fc46e6578aa63cdec91ae506904011e1d138b654e9d6a136df9d9f79635a60e3, name=bridge, type=bridge)
2022-01-03T11:16:01.223305820+01:00 container start fc46e6578aa63cdec91ae506904011e1d138b654e9d6a136df9d9f79635a60e3 (image=jrei/systemd-debian, maintainer=j8r, name=systemd-debian, org.opencontainers.image.revision=a54bb365bc93f9f0bb071193bf417d60571eb00b, org.opencontainers.image.vendor=j8r)
2022-01-03T11:16:01.247775539+01:00 container die fc46e6578aa63cdec91ae506904011e1d138b654e9d6a136df9d9f79635a60e3 (exitCode=255, image=jrei/systemd-debian, maintainer=j8r, name=systemd-debian, org.opencontainers.image.revision=a54bb365bc93f9f0bb071193bf417d60571eb00b, org.opencontainers.image.vendor=j8r)
2022-01-03T11:16:01.312331756+01:00 network disconnect dedb2711e72f1bf9c3a5ea30d2aea7e5a78a26f38578b2a85c570cf2ec974761 (container=fc46e6578aa63cdec91ae506904011e1d138b654e9d6a136df9d9f79635a60e3, name=bridge, type=bridge)

Cannot compile statically

Hi!
Simple project with src/test.cr

require "llvm/lib_llvm"
require "llvm/enums"

puts "123"

Execute: docker run --rm -it -v $PWD:/app -w /app jrei/crystal-alpine crystal build --static --release src/test.cr
and gets:
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lstdc (this usually means you need to install the development package for libstdc)++
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: cc "${@}" -o '/app/test' -rdynamic -static /usr/bin/llvm-config --libs --system-libs --ldflags --link-static 2> /dev/null -lstdc++ /usr/lib/libpcre.a /usr/lib/libgc.a /usr/lib/libpthread.a /usr/lib/crystal/core/ext/libcrystal.a /usr/lib/libevent.a /usr/lib/librt.a -L/usr/lib -L/usr/local/lib

And i think docker project page have broken description
DeepinScreenshot_select-area_20190714152822

How to run in Gitlab Runner

How can jrei/systemd-debian:9 image be started in GitLab Runner enviroment, i.e. how to start it with only one command?

Entrypoint can be set to anything, but the container can not be manager, i.e. no daemon for the systemd can not started via the host docker as described in README https://github.com/j8r/dockerfiles/tree/master/systemd/debian.

exec /lib/systemd/systemd can be run without any issue, but how to open a bash then?

Multi-arch docker build

Hello,

First, thank you for your work.
I was wondering if it would be possible to add multi-arch support in those images?
I want to run them on ARM64 architecture.

Kind regards,

Windows Host: (jrei/systemd-ubuntu:18.04) Docker has stdout. Docker Compose doesn't.

I'm struggling with getting systemd output with docker-compose. While executing with plain docker run I successfully get the stdout.

I'm guessing that it has something to do with moby/moby#27202. But I may be wrong.

My dockerfile

FROM  jrei/systemd-ubuntu:18.04

RUN sed -i 's/#\(ForwardToConsole=\).*$/\1yes/' /etc/systemd/journald.conf

STOPSIGNAL SIGRTMIN+3

RUN printf '\
[Unit]\n\
Description=sleep & echo service\n\
\n\
[Service]\n\
ExecStart=/bin/sh -c "count=0; while true; do count=$(( $count + 1 )); echo \"x $count\"; sleep 2;  done"\n\
\n\
[Install]\n\
WantedBy=multi-user.target\
' >> /etc/systemd/system/echo-sleep.service && \
    systemctl enable echo-sleep.service

The following run command shows the stdout from the sleep & echo service.

docker build -t systemd-logging . &&
    docker run --name systemd-logging \
                      --security-opt seccomp=unconfined \
                      --tmpfs /tmp \
                      --tmpfs /run \
                      --tmpfs /run/lock \
                      -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
                      -t systemd-logging

The equivalent docker-compose setup doesn't show the output or even the systemd bootup entries.

version: "3.7"

services:

  systemd-logging:
    container_name: systemd-logging
    image: systemd-logging
    privileged: true
    logging:
      driver: "json-file"
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 8442:443
      - 2342:2345
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    security_opt:
      - seccomp:unconfined
    tmpfs:
      - /tmp
      - /run
      - /run/lock

and docker-compose up.

I have also tried to utilize CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] but without success.

I would be grateful if anybody would have any hunch on this problem. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.