Skip to content

Instantly share code, notes, and snippets.

@aniongithub
Created April 19, 2023 02:12
Show Gist options
  • Select an option

  • Save aniongithub/c457dbd657da606d9ecb290182902bc4 to your computer and use it in GitHub Desktop.

Select an option

Save aniongithub/c457dbd657da606d9ecb290182902bc4 to your computer and use it in GitHub Desktop.

Revisions

  1. aniongithub created this gist Apr 19, 2023.
    25 changes: 25 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # syntax=docker/dockerfile:1.3-labs
    # Enable heredoc syntax https://collabnix.com/using-heredocs-in-dockerfiles-simplify-your-image-building-process/

    FROM ubuntu

    RUN wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -O /usr/local/bin/systemctl &&\
    chmod +x /usr/local/bin/systemctl

    RUN cat <<EOF > /etc/systemd/system/memgraph.service
    [Unit]
    Description=Docker systemd service
    DefaultDependencies=no

    [Service]
    Type=simple
    WorkingDirectory=/working/directory/here
    ExecStart=/command/to/execute/here --args-here
    Restart=on-failure
    RestartSec=5s
    User=root
    TimeoutSec=900

    [Install]
    WantedBy=sysinit.target
    EOF