pgloader
pgloader copied to clipboard
Unable to Run CCL Dockerfile on OSX
-
[ x] pgloader --version
latest from github repo -
[ x] did you test a fresh compile from the source tree?
I cloned the repo and tried to build Dockerfile.ccl
-
[ x] did you search for other similar issues?
Yes
-
[x ] how can I reproduce the bug?
On OSX Sequioa Apple M3:
git clone [email protected]:dimitri/pgloader.gitdocker build -f ./Dockerfile.ccl .See error(s):
Dockerfile.ccl:32
--------------------
31 |
32 | >>> RUN mkdir -p /opt/src/pgloader/build/bin \
33 | >>> && cd /opt/src/pgloader \
34 | >>> && make CL=ccl DYNSIZE=$DYNSIZE clones save
35 |
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir -p /opt/src/pgloader/build/bin && cd /opt/src/pgloader && make CL=ccl DYNSIZE=$DYNSIZE clones save" did not complete successfully: exit code: 2
Poking around in the Image more, issue seems to be with running the save command:
mkdir -p build
curl -o build/quicklisp.lisp http://beta.quicklisp.org/quicklisp.lisp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 57144 100 57144 0 0 83299 0 --:--:-- --:--:-- --:--:-- 83421
ccl --no-init --load build/quicklisp.lisp \
--load src/getenv.lisp \
--eval '(quicklisp-quickstart:install :path "build/quicklisp" :proxy (getenv "http_proxy"))' \
--eval '(quit)'
Can't determine machine architecture. Fix this.
make: *** [Makefile:92: build/quicklisp/setup.lisp] Error 1
This is going pretty far back but for whats its worth I was able to run an old pgloader-ccl version I saw in the ubuntu 18.04 repo, who knows what has changed since then:
FROM --platform=linux/amd64 ubuntu:18.04
ARG MSSQL_SERVER
ARG MSSQL_DATABASE
ARG MSSQL_USERNAME
ARG MSSQL_PASSWORD
ARG POSTGRES_SERVER
ARG POSTGRES_DATABASE
ARG POSTGRES_USERNAME
ARG POSTGRES_PASSWORD
##################################
### PGLOADER-CCL
### in order for ccl to work pgloader has to add the following cast: type datetimeoffset to timestamp drop default
##################################
# Install pgloader-ccl dependencies
RUN apt update
RUN apt install -y gnupg wget apt-transport-https libssl1.0.0 libssl-dev freetds-dev
# Add pgloader-ccl keys
RUN wget -qO- https://dl.packager.io/srv/opf/pgloader-ccl/key | apt-key add -
# Add pgloader-ccl repo
RUN wget -O /etc/apt/sources.list.d/pgloader-ccl.list \
https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/ubuntu/18.04.repo
# Install pgloader-ccl
RUN apt update
RUN apt install -y pgloader-ccl