Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Server Build stuck #435

Closed
2 of 5 tasks
Ediee2000 opened this issue Jul 7, 2022 · 2 comments
Closed
2 of 5 tasks

Docker Server Build stuck #435

Ediee2000 opened this issue Jul 7, 2022 · 2 comments
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@Ediee2000
Copy link

Priority

Low

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

When i try build server image on docker, i get stuck at beginning of build in that step:
[3/143] Linking CXX static library src/protobuf/libprotobuf.a

No matter what i do, i never pass from this step. last tried that commands run for 27k seconds.

Console:
`
PS G:\tibia\otserv\test\canary\docker> docker-compose build
website uses an image, skipping
login uses an image, skipping
Building mysql
[+] Building 3.1s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 102B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/mariadb:10 2.3s
=> [auth] library/mariadb:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 33B 0.2s
=> [1/2] FROM docker.io/library/mariadb:10@sha256:88fcb7d92c7f61cd885c4d309c98461f3607aa6dbd57a2474be86e1956b36d 0.0s
=> CACHED [2/2] COPY schema.sql /docker-entrypoint-initdb.d/ 0.0s
=> exporting to image 0.4s
=> => exporting layers 0.0s
=> => writing image sha256:4da1898a7a3d39606c82eabbf12b22d818a62ebda672b3fa4f306cabbc2e04d1 0.4s
=> => naming to docker.io/library/docker_mysql 0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Building server
[+] Building 528.4s (18/26)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.33kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 1.8s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [dependencies 1/11] FROM docker.io/library/ubuntu:22.04@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b26 0.0s
=> [internal] load build context 18.7s
=> => transferring context: 112.78MB 14.5s
=> CACHED [dependencies 2/11] RUN apt-get update && apt-get install -y --no-install-recommends cmake git unzip 0.0s
=> CACHED [dependencies 3/11] RUN export HTTP_PROXY= 0.0s
=> CACHED [dependencies 4/11] RUN export HTTPS_PROXY= 0.0s
=> CACHED [dependencies 5/11] RUN export FTP_PROXY= 0.0s
=> CACHED [dependencies 6/11] WORKDIR /opt 0.0s
=> CACHED [dependencies 7/11] RUN git clone https://github.com/microsoft/vcpkg --depth=1 0.0s
=> CACHED [dependencies 8/11] RUN ./vcpkg/bootstrap-vcpkg.sh 0.0s
=> CACHED [dependencies 9/11] WORKDIR /opt/vcpkg 0.0s
=> CACHED [dependencies 10/11] COPY vcpkg.json /opt/vcpkg/ 0.0s
=> CACHED [dependencies 11/11] RUN /opt/vcpkg/vcpkg --feature-flags=binarycaching,manifests,versions install 0.0s
=> CACHED [build 1/3] COPY . /srv/ 0.0s
=> CACHED [build 2/3] WORKDIR /srv 0.0s
=> [build 3/3] RUN export VCPKG_ROOT=/opt/vcpkg/ && cmake --preset linux-release && cmake --build --preset lin 507.7s
=> => # -- Configuring done
=> => # -- Generating done
=> => # -- Build files have been written to: /srv/build/linux-release
=> => # [1/143] Running cpp protocol buffer compiler on /srv/src/protobuf/appearances.proto
=> => # [2/143] Building CXX object src/protobuf/CMakeFiles/protobuf.dir/appearances.pb.cc.o
=> => # [3/143] Linking CXX static library src/protobuf/libprotobuf.a
`

Dockerfile
`# Stage 1: Download all dependencies
FROM ubuntu:22.04 AS dependencies

RUN apt-get update && apt-get install -y --no-install-recommends cmake git
unzip build-essential ca-certificates curl zip unzip tar
pkg-config ninja-build autoconf automake libtool
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*

RUN export HTTP_PROXY=
RUN export HTTPS_PROXY=
RUN export FTP_PROXY=

WORKDIR /opt
RUN git clone https://github.com/microsoft/vcpkg --depth=1
RUN ./vcpkg/bootstrap-vcpkg.sh

WORKDIR /opt/vcpkg
COPY vcpkg.json /opt/vcpkg/
RUN /opt/vcpkg/vcpkg --feature-flags=binarycaching,manifests,versions install

FROM dependencies AS build

COPY . /srv/
WORKDIR /srv

RUN export VCPKG_ROOT=/opt/vcpkg/ && cmake --preset linux-release && cmake --build --preset linux-release

FROM ubuntu:22.04

COPY --from=build /srv/build/linux-release/bin/canary /bin/canary
COPY LICENSE *.sql key.pem /canary/
COPY data /canary/data
COPY config.lua.dist /canary/config.lua

WORKDIR /canary

RUN apt-get update && apt-get install -y --no-install-recommends
mariadb-client
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*

COPY docker/server/start.sh start.sh

ENTRYPOINT ["/canary/start.sh"]`

I had modified the dockerfile with export proxy variables because i had problems to download vcpkg from github, even not using proxy.

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Ediee2000 Ediee2000 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jul 7, 2022
@github-actions github-actions bot added data Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing labels Jul 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

This issue is stale because it has been open 120 days with no activity.

@github-actions github-actions bot added the Stale No activity label Oct 6, 2022
@beats-dh beats-dh removed data labels Dec 6, 2022
@github-actions github-actions bot removed the Stale No activity label Dec 8, 2022
@murilo09
Copy link
Contributor

Fixed in #716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants