azim
October 7, 2022, 1:17am
1
Hello all!
Im not sure if Im the only one that getting this error. Im getting error when running fly deploy
% fly deploy
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-frosty-star-5123 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon 57.6kB
[+] Building 30.0s (4/4) FINISHED
=> CACHED [internal] load remote build context 0.0s
=> CACHED copy /context / 0.0s
=> ERROR [internal] load metadata for docker.io/library/debian:bullseye-20210902-slim 30.0s
=> ERROR [internal] load metadata for docker.io/hexpm/elixir:1.13.4-erlang-25.0.3-debian-bullseye-20210902-slim 30.0s
------
> [internal] load metadata for docker.io/library/debian:bullseye-20210902-slim:
------
------
> [internal] load metadata for docker.io/hexpm/elixir:1.13.4-erlang-25.0.3-debian-bullseye-20210902-slim:
------
Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to do request: Head "https://docker-hub-mirror.fly.io/v2/library/debian/manifests/bullseye-20210902-slim?ns=docker.io": dial tcp [2a09:8280:1::3:29fe]:443: connect: connection refused
Checked in Docker Hub , seems like the tag exist
Might be an issue with Fly’s remote builders. To unblock yourself for now, see if building your app’s docker image locally (wherever the flyctl
cmd is run from) works: fly deploy --local-only
.
Switch to remote builders whenever they recover.
azim
October 7, 2022, 2:08pm
3
After installing docker on my machine, fly deploy --local-only
works.
In fly.io Status doesn’t seem like they reported any incident
If you’re okay, can you share your Dockerfile
? Fly’s remote builders cannot pull from private repositories, and that’s another thing to keep in mind. Here are some workarounds (other than --local-only
), if that’s the case: Fly deploy permission denied connecting to Docker daemon - #2 by ignoramous
Welcome to the world of Fly.io
, I guess
azim
October 7, 2022, 2:58pm
5
Will look into your workarounds. Thanks!
Here are my Dockerfile
. I didn’t change anything since I ran fly launch
ARG ELIXIR_VERSION=1.13.4
ARG OTP_VERSION=25.0.3
ARG DEBIAN_VERSION=bullseye-20210902-slim
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
FROM ${BUILDER_IMAGE} as builder
# install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
# prepare build dir
WORKDIR /app
# install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
# set build ENV
ENV MIX_ENV="prod"
# install mix dependencies
COPY mix.exs mix.lock ./
RUN mix deps.get --only $MIX_ENV
RUN mkdir config
# copy compile-time config files before we compile dependencies
# to ensure any relevant config change will trigger the dependencies
# to be re-compiled.
COPY config/config.exs config/${MIX_ENV}.exs config/
RUN mix deps.compile
COPY priv priv
COPY lib lib
COPY assets assets
# compile assets
RUN mix assets.deploy
# Compile the release
RUN mix compile
# Changes to config/runtime.exs don't require recompiling the code
COPY config/runtime.exs config/
COPY rel rel
RUN mix release
# start a new build stage so that the final image will only contain
# the compiled release and other runtime necessities
FROM ${RUNNER_IMAGE}
RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
WORKDIR "/app"
RUN chown nobody /app
# set runner ENV
ENV MIX_ENV="prod"
# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/kepr ./
USER nobody
CMD ["/app/bin/server"]
# Appended by flyctl
ENV ECTO_IPV6 true
ENV ERL_AFLAGS "-proto_dist inet6_tcp"
# Appended by flyctl
ENV ECTO_IPV6 true
ENV ERL_AFLAGS "-proto_dist inet6_tcp"
# Appended by flyctl
ENV ECTO_IPV6 true
ENV ERL_AFLAGS "-proto_dist inet6_tcp"
# Appended by flyctl
ENV ECTO_IPV6 true
ENV ERL_AFLAGS "-proto_dist inet6_tcp"
1 Like
azim
October 9, 2022, 6:10pm
6
I guess it resolve itself after few days. Thanks for the help!
At least I know what to do if this happen again
Not sure if this is related or not
1 Like