Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on ArgumentError: could not find a temporary directory
Post
ArgumentError: could not find a temporary directory
+0
−0
Hello,
I am trying to build a docker image for contributing to the devdocs repository, however I am failing to get past the thor docs:download --all
command. It fails with the below error:
. is world-writable: /devdocs
(1/680) Angular FAILED (ArgumentError: could not find a temporary directory)
Does anybody have an idea why this is occurring?
If it helps, the thor
command is using Ruby.
Below is my Dockerfile
:
#
# Base layer that both dev and runtime inherit from.
#
FROM ruby:3.3.2-alpine as devdocs-base
ENV LANG=C.UTF-8
ARG USERNAME=devdocs
ARG USER_ID=1000
ARG GROUP_ID=1000
WORKDIR /devdocs
EXPOSE 9292
COPY Gemfile Gemfile.lock Rakefile Thorfile /devdocs/
RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
rm -rf /var/cache/apk/* /usr/lib/node_modules
RUN gem install bundler && \
bundle config set path.system true && \
bundle config set without test && \
bundle install && \
rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache /tmp
RUN addgroup -g $GROUP_ID $USERNAME && \
adduser -u $USER_ID -G $USERNAME -D -h /devdocs $USERNAME && \
chown -R $USERNAME:$USERNAME /devdocs
#
# Development Image
#
FROM devdocs-base as devdocs-dev
RUN bundle config unset without && \
bundle install && \
apk add --update bash curl && \
curl -LO https://download.docker.com/linux/static/stable/x86_64/docker-26.1.4.tgz && \
tar -xzf docker-26.1.4.tgz && \
mv docker/docker /usr/bin && \
rm -rf docker docker-26.1.4.tgz /tmp && \
rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache
VOLUME [ "/devdocs" ]
CMD bash
#
# Runtime Image
#
FROM devdocs-base as devdocs
ENV ENABLE_SERVICE_WORKER=true
COPY . /devdocs/
RUN thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /tmp
RUN chown -R $USERNAME:$USERNAME /devdocs
USER $USERNAME
CMD rackup --host 0.0.0.0 -E production
1 comment thread