Replies: 1 comment 1 reply
-
|
You need to add the pub-cache/bin to your path
https://dart.dev/tools/pub/environment-variables#:~:text=Some%20of%20pub's%20dependencies%20are,depending%20on%20the%20Windows%20version
.)
…On Fri, 7 Mar 2025, 4:10 am Søren Krogh Neigaard, ***@***.***> wrote:
Hi,
I am trying to build a Docker image withe a Dockerfile:
`FROM ubuntu AS build
RUN apt-get update
RUN apt-get install -y curl git unzip
RUN git clone https://github.com/flutter/flutter.git
ENV PATH="/flutter/bin:${PATH}"
COPY . /app
WORKDIR /app
RUN dart pub global activate onepub
RUN export ONEPUB_TOKEN="SOME-TOKEN"
RUN onepub import SOME-LIBRARY
RUN flutter clean
RUN dart run build_runner build -d
RUN flutter pub get
RUN flutter build web --debug
FROM nginx
COPY --from=build /app/build/web /usr/share/nginx/html`
But I get the error:
ERROR [build 9/13] RUN onepub import SOME-LIBRARY /bin/sh: 1: onepub: not
found
Any ideas?
Thank you
Søren
—
Reply to this email directly, view it on GitHub
<#551>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OBCJO7TZX6QHVBZ6TD2TB6P3AVCNFSM6AAAAABYPHAJASVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGA2DONZRHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
icarusoft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to build a Docker image withe a Dockerfile:
`FROM ubuntu AS build
RUN apt-get update
RUN apt-get install -y curl git unzip
RUN git clone https://github.com/flutter/flutter.git
ENV PATH="/flutter/bin:${PATH}"
COPY . /app
WORKDIR /app
RUN dart pub global activate onepub
RUN export ONEPUB_TOKEN="SOME-TOKEN"
RUN onepub import SOME-LIBRARY
RUN flutter clean
RUN dart run build_runner build -d
RUN flutter pub get
RUN flutter build web --debug
FROM nginx
COPY --from=build /app/build/web /usr/share/nginx/html`
But I get the error:
ERROR [build 9/13] RUN onepub import SOME-LIBRARY /bin/sh: 1: onepub: not foundAny ideas?
Thank you
Søren
Beta Was this translation helpful? Give feedback.
All reactions