Closed deoren closed 6 years ago
ubuntu@ubuntu-devbox:~/Desktop# cat Dockerfile
FROM ubuntu
MAINTAINER deoren <deoren@users.noreply.github.com>
COPY progit2-build-script.sh /progit2-build-script.sh
#RUN /progit2-build-script.sh && /bin/bash
ENTRYPOINT /progit2-build-script.sh && /bin/bash
VOLUME /home/ubuntu/Desktop/output /output
The progit2-build-script.sh
script is the same as the one mentioned in the OP.
ubuntu@ubuntu-devbox:~/Desktop# sudo docker build -t deoren/progit2:0.1 $PWD/
Sending build context to Docker daemon 13.83MB
Step 1/5 : FROM ubuntu
---> 0458a4468cbc
Step 2/5 : MAINTAINER deoren <docker-testing@whyaskwhy.org>
---> Running in fdbd1c62dd60
Removing intermediate container fdbd1c62dd60
---> 8a392cd6d736
Step 3/5 : COPY progit2-build-script.sh /progit2-build-script.sh
---> f42a05c7bbd9
Step 4/5 : ENTRYPOINT /progit2-build-script.sh && /bin/bash
---> Running in de0735b7861a
Removing intermediate container de0735b7861a
---> 52b0beab6b19
Step 5/5 : VOLUME /home/ubuntu/Desktop/output /output
---> Running in 6d15c78aef51
Removing intermediate container 6d15c78aef51
---> c0d283401eec
Successfully built c0d283401eec
Successfully tagged deoren/progit2:0.1
ubuntu@ubuntu-devbox:~/Desktop# sudo docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
deoren/progit2 0.1 c0d283401eec 9 minutes ago 112MB
progit2-build latest 20aecd8c77bd 8 hours ago 795MB
ubuntu latest 0458a4468cbc 3 days ago 112MB
bash latest 2c3838775cf0 2 weeks ago 12.2MB
hello-world latest f2a91732366c 2 months ago 1.85kB
The progit2-build
entry is from me saving the results of a test run earlier. I think I used sudo docker commit
in some fashion to save a session (container?) with a specific name.
I ran sudo docker run -ti -v $PWD/output:/output deoren/progit2:0.1
and the image booted and ...
Not a bad first start. :)
Well, I spoke too soon. Looks like there was a problem generating the epub file, but that may be related to something missing in the build environment.
It's worth noting that I did not specify a version of ubuntu when I opted to use it as the base image. It defaulted to 16.04, which should be recent enough.
root@ea9f8230f83a:/progit2# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
Well, I spoke too soon. Looks like there was a problem generating the epub file, but that may be related to something missing in the build environment.
I'll pursue that later. At present I have the image mostly working.
Opted to split the existing single Dockerfile + script into files for three images:
Still much tinkering to do, best practices to ignore, etc.
I have workable images for Alpine 3.7, Ubuntu 16.04 and Ubuntu 17.10. Still more to do, but they're usable in their current state. Good enough for a first try.
Overview
I could follow the footsteps of others and use a smaller distro image, but I have more experience with Ubuntu and will likely find the process to be easier starting with something familiar.
TODO
Resources
Source repo: https://github.com/progit/progit2.git
Scratch/test script: https://github.com/deoren/docker-testing/blob/master/progit2/progit2-build-script.sh
Internal ticket: 6315 (scratch notes)
Docker Repo: https://hub.docker.com/r/deoren/progit2/