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

Update Docker on build container #4468

Closed
nathanaherne opened this issue Jul 22, 2018 · 5 comments
Closed

Update Docker on build container #4468

nathanaherne opened this issue Jul 22, 2018 · 5 comments
Labels

Comments

@nathanaherne
Copy link

Description of your issue:

Docker build fails with the message Unknown Flag: chown, which is the result of having this line in the Dockerfile COPY --chown=node

If I could change the Dockerfile to separate the COPY and chown commands I would do this but the Dockerfile I am running comes from a gitub repository.

I have tried to solve this by upgrading Docker on the build image running the following commands:

build:
  ci:
    # Install pacakages to allow apt to work over HTTPS
    - apt-get install -y apt-transport-https ca-certificates curl software-properties-common
    - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    # Add docker respositories
    - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge"
    # Update package list
    - apt-get update
    - apt-get install -y docker-ce=18.05.0~ce~3-0~ubuntu

The install of Docker fails with the error

Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_18.05.0~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.05.0~ce~3-0~ubuntu) ...
dpkg: error processing archive /var/cache/apt/archives/docker-ce_18.05.0~ce~3-0~ubuntu_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/docker' before installing new version: Invalid cross-device link
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 /var/cache/apt/archives/docker-ce_18.05.0~ce~3-0~ubuntu_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am sure there must be a way to update Docker on the shippable build image but I have been unable to find out how by Googling.

@nmarjanovic
Copy link

nmarjanovic commented Jul 23, 2018

Hi,

Asked many times before, you can't. They said, they will push docker 18+ this month. But i didn't get updates by mail (ups, they don't do that neither). Check their blog for updates.

P.S. Blog is working with https, but docs.shippable.com only http (people, it's 2018, https is default today) ;)

@manishas
Copy link
Contributor

@ric03uec can you please follow up on the Docker version question?

@nmarjanovic @nathanaherne we publish release notes for each release at https://github.com/Shippable/admiral/tree/master/releaseNotes We’re working on a way to let customers subscribe to them so they can get automatic updates.

@ric03uec
Copy link

@nathanaherne

  • the solution that you're trying wont work because the build is running inside a docker container which means installing/upgrading docker in build steps will just install it in the container and not the host
  • you could run build steps on the host using a runSh job (http://docs.shippable.com/platform/workflow/job/runsh/#yml-definition) and upgrade docker. But since docker daemon will restart after the upgrade, it'll kill shippable agent on the host which is orchestrating the build which will result in build getting stuck. So this is not recommended.

we're working on adding support for current stable docker version (18.03.x). i'll post and update on this thread once we have a specific timeline for it.

@manishas
Copy link
Contributor

Just to put a rough ETA on this, we expect to launch Docker 18 support in the first week of August.

@manishas
Copy link
Contributor

Duplicate of #4398. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants