Good morning, another question regarding `docker/s...
# docker
c
Good morning, another question regarding
docker/sdk
build process. We have a problem that during the build process
data/translation
directory goes missing. Or is this the expected behaviour and we should do some post deployment actions? Check thread for more specific details.
We have a problem that the 
data/translation
 directory doesn’t exist in our containers. We checked the build logs and as far as we can see this directory was never included in the image. Pipeline copies the directory correct, but it seems that it is not taken in one of the steps in 
docker/sdk
 build process. Here are the excerpts from the build instructions and the respective logs:
Copy code
pre_build:
    commands:
      - docker version
      - env
      - $(aws ecr get-login --no-include-email --region ${AWS_DEFAULT_REGION} --registry-ids ${AWS_ACCOUNT_ID})
      - git clone ${SPRYKER_SDK_REPO} -b ${SPRYKER_SDK_BRANCH} ./docker
      - cd ./docker
      - git branch -a
      - cd ${CODEBUILD_SRC_DIR}
      - ls -lha
      - ls -lha data
Copy code
[Container] 2020/07/02 09:10:50 Running command cd ${CODEBUILD_SRC_DIR}
207
208[Container] 2020/07/02 09:10:50 Running command ls -lha
209total 2.1M
210drwxr-xr-x 11 root root 4.0K Jul  2 09:10 .
211drwxr-xr-x  4 root root 4.0K Jul  2 09:10 ..
212-rw-r--r--  1 root root  150 Jul  2 09:10 .dockerignore
213-rw-r--r--  1 root root  330 Jul  2 09:10 .editorconfig
214-rw-r--r--  1 root root 8.1K Jul  2 09:10 .eslintrc.js
215-rw-r--r--  1 root root  414 Jul  2 09:10 .gitattributes
216-rw-r--r--  1 root root  422 Jul  2 09:10 .githook
217drwxr-xr-x  2 root root 4.0K Jul  2 09:10 .github
218-rw-r--r--  1 root root 1.4K Jul  2 09:10 .gitignore
219-rw-r--r--  1 root root  558 Jul  2 09:10 .gitlab-ci.yml
220-rw-r--r--  1 root root  163 Jul  2 09:10 .license
221-rw-r--r--  1 root root    5 Jul  2 09:10 .nvmrc
222-rw-r--r--  1 root root  249 Jul  2 09:10 .scrutinizer.yml
223-rw-r--r--  1 root root 6.8K Jul  2 09:10 .stylelintrc
224-rw-r--r--  1 root root 8.4K Jul  2 09:10 .travis.yml
225-rw-r--r--  1 root root 3.9K Jul  2 09:10 LICENSE
226-rw-r--r--  1 root root 1018 Jul  2 09:10 README.md
227drwxr-xr-x  2 root root 4.0K Jul  2 09:10 ci
228-rw-r--r--  1 root root 1.1K Jul  2 09:10 codeception.acceptance.yml
229-rw-r--r--  1 root root  702 Jul  2 09:10 codeception.api.yml
230-rw-r--r--  1 root root  683 Jul  2 09:10 codeception.functional.yml
231-rw-r--r--  1 root root  990 Jul  2 09:10 codeception.yml
232-rw-r--r--  1 root root  226 Jul  2 09:10 composer.ci.json
233-rw-r--r--  1 root root  12K Jul  2 09:10 composer.json
234-rw-r--r--  1 root root 1.4M Jul  2 09:10 composer.lock
235drwxr-xr-x  7 root root 4.0K Jul  2 09:10 config
236drwxr-xr-x  4 root root 4.0K Jul  2 09:10 data
237-rw-r--r--  1 root root 2.7K Jul  2 09:10 deploy.ci.yml
238-rw-r--r--  1 root root 2.4K Jul  2 09:10 deploy.dev.yml
239-rw-r--r--  1 root root 2.0K Jul  2 09:10 deploy.yml
240drwxr-xr-x  9 root root 4.0K Jul  2 09:10 docker
241drwxr-xr-x  5 root root 4.0K Jul  2 09:10 frontend
242-rw-r--r--  1 root root  13K Jul  2 09:10 newrelic.ini
243-rw-r--r--  1 root root 411K Jul  2 09:10 package-lock.json
244-rw-r--r--  1 root root 2.4K Jul  2 09:10 package.json
245-rw-r--r--  1 root root 1.4K Jul  2 09:10 phpstan-bootstrap.php
246-rw-r--r--  1 root root   24 Jul  2 09:10 phpstan.json
247-rw-r--r--  1 root root  467 Jul  2 09:10 phpstan.neon
248drwxr-xr-x  5 root root 4.0K Jul  2 09:10 public
249-rw-r--r--  1 root root  147 Jul  2 09:10 setup
250drwxr-xr-x  4 root root 4.0K Jul  2 09:10 src
251-rw-r--r--  1 root root 1.2K Jul  2 09:10 test-autoload.php
252drwxr-xr-x  5 root root 4.0K Jul  2 09:10 tests
253-rw-r--r--  1 root root 1.4K Jul  2 09:10 tsconfig.json
254-rw-r--r--  1 root root 7.7K Jul  2 09:10 tslint.json
255-rwxr-xr-x  1 root root  473 Jul  2 09:10 warmup.sh
256
257[Container] 2020/07/02 09:10:50 Running command ls -lha data
258total 16K
259drwxr-xr-x  4 root root 4.0K Jul  2 09:10 .
260drwxr-xr-x 11 root root 4.0K Jul  2 09:10 ..
261drwxr-xr-x  4 root root 4.0K Jul  2 09:10 import
262drwxr-xr-x  3 root root 4.0K Jul  2 09:10 translation
So far all good. The following will be executed afterwards:
Copy code
build:
    commands:
      - env
      - ./docker/sdk boot
      - ./docker/sdk build
For this we found the following logs:
Copy code
#26 [spryker_app  1/10] COPY --chown=spryker:spryker data /data/data
2743#26       digest: sha256:3161f1a84c2f2073b2d146bd0db3e1ba9e26220812f7198fa0ba4d7ce0d06f5b
2744#26         name: "[spryker_app  1/10] COPY --chown=spryker:spryker data /data/data"
2745#26      started: 2020-07-02 09:12:12.395121112 +0000 UTC
2746#26    completed: 2020-07-02 09:12:12.703731913 +0000 UTC
2747#26     duration: 308.610801ms
As we can see the whole 
data/data
 directory is copied. What we can’t find out is why the 
translation
 directory isn’t. We are using 
doscker/sdk
 version 1.10.1.
h
But also check your .dockerignore file
It should contain !data/translations
Copy code
/data
!/data/import
!/data/translation
c
Hi Mike, so there are 2 actions that need to be done in order to fix the issue? 1. use docker/sdk v1.15.0 2. add
!data/translation
to project
.dockerignore
h
Yes, it seems.
c
ok, will try, thank you
h
Copy code
308.610801ms
Is that expected for copying /data?
c
too fast or what are you thinking?
h
too slow…
or that is just 300ms?
If so it is ok.
At some moment I have seen 300 seconds in my mind. :))
c
should be 300ms
Copy code
started: 2020-07-02 09:12:12.395121112    completed: 2020-07-02 09:12:12.703731913
h
Yeah, my bad.