Closed elalemanyo closed 10 months ago
Hi @elalemanyo! Unfortunately, I can't reproduce the issue. Could show the whole Dockerfile?
@DarthSim yes! of course.
ARG PROJECT_RUBY_VERSION
ARG DISTRO_NAME=bullseye
FROM ruby:$PROJECT_RUBY_VERSION-slim-$DISTRO_NAME
COPY --from=golang:1.19.1-bullseye /usr/local/go/ /usr/local/go/
ENV GOPATH=$HOME/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ARG PROJECT_NAME
ARG DISTRO_NAME
# Common dependencies
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
build-essential \
gnupg2 \
curl \
less \
git \
libzmq3-dev \
file \
rsync \
tmux \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
RUN go install github.com/DarthSim/overmind/v2@latest
ARG PROJECT_PG_MAJOR
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /usr/share/keyrings/postgres-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/postgres-archive-keyring.gpg] https://apt.postgresql.org/pub/repos/apt/" \
$DISTRO_NAME-pgdg main $PROJECT_PG_MAJOR | tee /etc/apt/sources.list.d/postgres.list > /dev/null
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
libpq-dev \
postgresql-client-$PROJECT_PG_MAJOR \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
ARG PROJECT_NODE_MAJOR
RUN curl -sL https://deb.nodesource.com/setup_$PROJECT_NODE_MAJOR.x | bash -
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
nodejs \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
ARG PROJECT_YARN_VERSION
RUN npm install -g yarn@$PROJECT_YARN_VERSION
# Configure bundler
ENV LANG=C.UTF-8 \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=3
# Store Bundler settings in the project's root
ENV BUNDLE_APP_CONFIG=.bundle
# Uncomment this line if you want to run binstubs without prefixing with `bin/` or `bundle exec`
# ENV PATH /app/bin:$PATH
# Upgrade RubyGems and install the latest Bundler version
RUN gem update --system && \
gem install bundler
# Create a directory for the app code
RUN mkdir -p /$PROJECT_NAME
WORKDIR /$PROJECT_NAME
I built an image from this Dockerfile, and still can't reproduce the issue 😓 Could you try to replace entries in your Procfile with something 100% working like sleep 100
?
@elalemanyo I've had the same issue. Did you maybe also use a tmpfs
for the /tmp
folder?
By default, tmpfs
doesn't support executing files from it, so I had to add :exec
in my docker-compose.yml
file like this:
x-tmpfs: &tmpfs
tmpfs:
- - /tmp
+ - /tmp:exec
@elalemanyo I've had the same issue. Did you maybe also use a
tmpfs
for the/tmp
folder? By default,tmpfs
doesn't support executing files from it, so I had to add:exec
in mydocker-compose.yml
file like this:x-tmpfs: &tmpfs tmpfs: - - /tmp + - /tmp:exec
oh! I would try that, thanks. BTW how are you installing overwind in your docker image? Is there a simple way to do this? In this case I start from a ruby image.
oh! I would try that, thanks. BTW how are you installing overwind in your docker image? Is there a simple way to do this? In this case I start from a ruby image.
Wasn't there yet, but I think my approach would be something like:
FROM golang:1.21.0-alpine AS builder
RUN go install github.com/DarthSim/overmind/v2@latest
FROM alpine:latest
COPY --from=builder /go/bin/overmind /usr/local/bin/overmind
btw I think we can close this issue because it's docker/config related :)
Hi, I am trying to replace
foreman
withovermind
. All my dev setup is running with Docker evilmartians/ruby-on-whales setup. To getovermind
running I add some changes to myDockerfile
ENV GOPATH=$HOME/go ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
RUN go install github.com/DarthSim/overmind/v2@latest