[GH-ISSUE #174] Docker - Unable to build API image #2047

Closed
opened 2026-03-14 02:14:51 +03:00 by kerem · 3 comments
Owner

Originally created by @TnTBass on GitHub (Nov 10, 2020).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/174

Step 33/33 fails, looks like the certificates aren't in the Docker image (or not being referenced) attempting to be built, causing the git clone to fail.

Step 33/33 : RUN /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && cp ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/ && chmod +x /usr/local/bin/goversioninfo
---> Running in c845f12794a2

cd .; git clone -- https://github.com/josephspurrier/goversioninfo /root/go/src/github.com/josephspurrier/goversioninfo

Cloning into '/root/go/src/github.com/josephspurrier/goversioninfo'...
fatal: unable to access 'https://github.com/josephspurrier/goversioninfo/': server certificate verification failed. CAfile: none CRLfile: none
package github.com/josephspurrier/goversioninfo/cmd/goversioninfo: exit status 128
ERROR: Service 'celery-service' failed to build : The command '/bin/sh -c /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && cp ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/ && chmod +x /usr/local/bin/goversioninfo' returned a non-zero code: 1

Originally created by @TnTBass on GitHub (Nov 10, 2020). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/174 Step 33/33 fails, looks like the certificates aren't in the Docker image (or not being referenced) attempting to be built, causing the git clone to fail. Step 33/33 : RUN /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && cp ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/ && chmod +x /usr/local/bin/goversioninfo ---> Running in c845f12794a2 # cd .; git clone -- https://github.com/josephspurrier/goversioninfo /root/go/src/github.com/josephspurrier/goversioninfo Cloning into '/root/go/src/github.com/josephspurrier/goversioninfo'... fatal: unable to access 'https://github.com/josephspurrier/goversioninfo/': server certificate verification failed. CAfile: none CRLfile: none package github.com/josephspurrier/goversioninfo/cmd/goversioninfo: exit status 128 ERROR: Service 'celery-service' failed to build : The command '/bin/sh -c /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && cp ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/ && chmod +x /usr/local/bin/goversioninfo' returned a non-zero code: 1
kerem closed this issue 2026-03-14 02:14:56 +03:00
Author
Owner

@sadnub commented on GitHub (Nov 11, 2020):

Modify your dockerfile in the docker/api folder to this:

FROM tiangolo/uwsgi-nginx:python3.8

WORKDIR /app

ARG DJANGO_SEKRET
ARG DJANGO_DEBUG
ARG POSTGRES_USER
ARG POSTGRES_PASS
ARG POSTGRES_HOST
ARG SALT_HOST
ARG SALT_USER
ARG SALT_PASS
ARG REDIS_HOST
ARG MESH_USER
ARG MESH_HOST
ARG MESH_TOKEN_KEY
ARG APP_HOST
ARG API_HOST
ARG ADMIN_URL

EXPOSE 80

RUN apt-get update && apt-get install -y gettext-base wget ca-certificates
COPY ./api/tacticalrmm/requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir setuptools==49.6.0 wheel==0.35.1
RUN pip install --no-cache-dir -r requirements.txt
RUN wget https://golang.org/dl/go1.15.linux-amd64.tar.gz -P /tmp
COPY ./api/tacticalrmm/ .
COPY ./docker/api/prestart.sh .
COPY ./docker/api/uwsgi.ini .
COPY ./docker/api/api.conf /app/api.conf.tmp
COPY ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/goversioninfo
RUN envsubst '\$APP_HOST, \$API_HOST' < /app/api.conf.tmp > /app/nginx.conf && \
    rm /app/api.conf.tmp
COPY ./docker/api/local_settings.py.keep ./tacticalrmm/local_settings.py.tmp
RUN envsubst < /app/tacticalrmm/local_settings.py.tmp > /app/tacticalrmm/local_settings.py && rm /app/tacticalrmm/local_settings.py.tmp

RUN tar -xzf /tmp/go1.15.linux-amd64.tar.gz -C /tmp && \
    mkdir /usr/local/rmmgo && \
    mv /tmp/go /usr/local/rmmgo/ && \
    rm -rf /tmp/go

RUN /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && \
    chmod +x /usr/local/bin/goversioninfo

I am in the process of revamping the docker setup, but this will get your image to build in the meantime.

Thanks!

<!-- gh-comment-id:725464342 --> @sadnub commented on GitHub (Nov 11, 2020): Modify your dockerfile in the docker/api folder to this: ``` FROM tiangolo/uwsgi-nginx:python3.8 WORKDIR /app ARG DJANGO_SEKRET ARG DJANGO_DEBUG ARG POSTGRES_USER ARG POSTGRES_PASS ARG POSTGRES_HOST ARG SALT_HOST ARG SALT_USER ARG SALT_PASS ARG REDIS_HOST ARG MESH_USER ARG MESH_HOST ARG MESH_TOKEN_KEY ARG APP_HOST ARG API_HOST ARG ADMIN_URL EXPOSE 80 RUN apt-get update && apt-get install -y gettext-base wget ca-certificates COPY ./api/tacticalrmm/requirements.txt . RUN pip install --upgrade pip RUN pip install --no-cache-dir setuptools==49.6.0 wheel==0.35.1 RUN pip install --no-cache-dir -r requirements.txt RUN wget https://golang.org/dl/go1.15.linux-amd64.tar.gz -P /tmp COPY ./api/tacticalrmm/ . COPY ./docker/api/prestart.sh . COPY ./docker/api/uwsgi.ini . COPY ./docker/api/api.conf /app/api.conf.tmp COPY ./api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/goversioninfo RUN envsubst '\$APP_HOST, \$API_HOST' < /app/api.conf.tmp > /app/nginx.conf && \ rm /app/api.conf.tmp COPY ./docker/api/local_settings.py.keep ./tacticalrmm/local_settings.py.tmp RUN envsubst < /app/tacticalrmm/local_settings.py.tmp > /app/tacticalrmm/local_settings.py && rm /app/tacticalrmm/local_settings.py.tmp RUN tar -xzf /tmp/go1.15.linux-amd64.tar.gz -C /tmp && \ mkdir /usr/local/rmmgo && \ mv /tmp/go /usr/local/rmmgo/ && \ rm -rf /tmp/go RUN /usr/local/rmmgo/go/bin/go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && \ chmod +x /usr/local/bin/goversioninfo ``` I am in the process of revamping the docker setup, but this will get your image to build in the meantime. Thanks!
Author
Owner

@TnTBass commented on GitHub (Nov 12, 2020):

That worked to build it. Thanks!

<!-- gh-comment-id:726154017 --> @TnTBass commented on GitHub (Nov 12, 2020): That worked to build it. Thanks!
Author
Owner

@sadnub commented on GitHub (Nov 12, 2020):

@TnTBass The latest changes have been released. Do a git pull -f to overwrite the local changes and pull the new ones. I was able to build the prod setup just fine, so if you are having issues it might be due to the .env file.

Thanks!

<!-- gh-comment-id:726357844 --> @sadnub commented on GitHub (Nov 12, 2020): @TnTBass The latest changes have been released. Do a `git pull -f` to overwrite the local changes and pull the new ones. I was able to build the prod setup just fine, so if you are having issues it might be due to the .env file. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2047
No description provided.